Tag: efficiency

  • No Drama, Please

    No Drama, Please

     

    Matrix-cow
    By Maciej Dembiniok (Own work), via Wikimedia Commons

    The other day, my boyfriend said to me, “One of the things I love about you is that you’re incapable of bullsh*tting. But I think that gets you into trouble, because people who do bullsh*t just assume you must as well.”

    This is his explanation for my latest headache. Where I make the argument as clearly as possible, re-read what I’m saying multiple times, send it to a friend to proof, firm that I’m making the argument that 2 + 2 = 4.

    And then get a response arguing with me like I’m saying 2 + 2 = 5.

    And so I respond saying, no, this is what I’m actually concerned about, this is why you haven’t addressed what I’ve said.

    But if someone thinks that the only reason I could possibly object is if I thought 2 + 2 = 5, and persists in thinking that despite my painstakingly constructed arguments, then there comes a point when it’s not worth reasoning with them.

    I am, perhaps, excessively paranoid about being reasonable. My question when I’m upset is invariably, is it reasonable for me to be bothered by this? What is a reasonable reaction? My default reaction tends to be no reaction. It’s hide over here, rationalizing things until I have it figured out.

    (I know, in some ways I seem really normal for a compsci. In others, well… I’m like this)

    Anyway, I just don’t see the point of bullsh*t, drama, mind games and manipulation. It seems extremely inefficient. Why not just ask for what you want, and treat people with respect?

     

  • Don’t Snippet Me, Damnit

    Don’t Snippet Me, Damnit

    ~Easy to see why it's a "Dead End"~
    Credit: flickr / ~Sage~

    One of my favorite blogs just moved to snippets in the RSS feed. I hate snippets in my RSS, except for techmeme because I mostly tend to use the headlines to stay on top of industry news in a manageable way.

    If you’re trying to monetize your website, it makes sense – it drives more traffic, right? Which means more ad clicks? I’m unconvinced, because I think RSS users are more savvy, and more savvy web-users are less likely to click on ads. Anyway, if someone’s using snippets I almost invariably unsubscribe from their feed. But I really like this blog and it’s useful.

    I follow a good number of blogs, over 60 articles a day get processed through my RSS. This means that each subscription is a calculation of interest/new information vs. time. A snippet could take 3-5 times as long to read as via my RSS reader, even longer if I’m on my iPhone (in general, I just don’t read things I have to click-through on my iPhone, it’s too slow). I also need to make a judgement as to whether it’s worth the click-through. This calculation of information vs time is why I almost never read articles with light text on a dark background (less readable = longer to read), and recently unsubscribed from a blog which had interesting content, but was written verbosely and was hard to read.

    This is the age of information overload. When you make your content less accessible – through poor design, bad writing, or through snippets you put a time tax on people reading your content. Personally, I rarely find this tax worth it.

    Luckily, I’m a programmer, and instapaper has an API. This could be the answer I’ve been looking for.

    But – I’m not that much of a hacker. And whilst solving what is (to me) a usability problem using code is appealing, invariably this kind of thing ranks lower than say, writing my thesis or coding something for that.

    Anyway, after some more searching I finally found a solution I’m happy with – a Chrome extension called Google Reader Full Feed, via Lifehacker. Hitting ‘z’ expands the article. Truncated feeds are still unusable on my iPhone, but now on my computer they’re not a problem.

    And, by the way, I finally got around to switching to Chrome recently. It’s so fast and awesome – I’m in love!

  • Student Workaholism

    The infinite corridor, from the main entrance
    Credit: flickr / Ed Yourdon

    It’s been bothering me a little lately that some people have been describing me as a workaholic, I think that university effectively rewards workaholism and in the real world it’s easier to avoid. Here are a list of reasons I’ve come up with (feel free to suggest more!):

    • No distinction between work place and home place, since home is where you work some, if not all, of the time.
    • Ditto work time, even people on flexi-time often have set hours in the middle of the day where they’re expected to be working. This is not the case for students.
    • The demarcation between your job and extra curricular activities is fuzzy when you’re a student – i.e. volunteering is in a sense part of your studies, as is the part-time job you do to fund them.
    • Students are rewarded for perfectionism.
    • Studying is infinite – as you will never know everything.
    • Students talk a lot about how much work they’re doing, mostly they’re not doing that much (takes a while to figure this out though) which can skew an individual’s perception of how much they should be doing.
    • The organization of the semester, with little work at the beginning and lots at the end, is inefficient.
    • Feedback is typically limited to letter grades, which do not provide a full picture of work and achievement.
    • Students are sometimes encouraged to manage their time badly through pointless assignments and irrelevant reading.
    • Most time management advice for students seems to consist of “don’t procrastinate”.
    • Businesses have incentives to provide tools to increase efficiency, university’s don’t have incentives, and rarely seem to educate students on tools that will help them work more effectively (for a list of tools I think are useful, see this post).
  • Effectiveness, not Efficiency

    Someone once described me as “scarily efficient”. I have to say, I took it as a huge compliment. However after reading The 4-Hour Work Week (Tim Ferriss – Amazon) and The 7 Habits of Highly Effective People (Stephen R Covey – Amazon) I’ve been focusing more on Effectiveness. There’s an important distinction. You can be efficient at doing trivial things, effectiveness is focusing your energy on things that will allow you to achieve the most important things.

    One of my friends was talking to me this evening about how she’s not achieving what she wants to, and about how she feels like having a personal life eats into her “work time”. I hope I gave her some reasonable advice, so I’m going to reproduce it here.

    1. Get Some Perspective

    Read The 4-Hour Work Week and 7 Habits (Amazon) and learn the difference between efficiency and effectiveness. Think about the things that you do that are efficient, rather than effective, and whether it’s possible to eliminate them.

    2. Don’t be Overwhelmed

    My friend has big problems keeping up with her RSS feeds. But if you’re overwhelmed to the point where you’re not reading anything, you’re not keeping up with what’s important. Incidentally, if you’re getting more articles than you can read a day and you stop trying to keep up, you’re still getting more articles than you can read a day and ultimately it won’t take long before you’ve got more than you’ll ever catch up with. Don’t just declare “RSS bankruptcy” – eliminate ruthlessly and keep just the important feeds. Learn to skim – if you start reading something and it’s not interesting, or relevant enough,  don’t waste your time reading to the end – move onto the next thing.

    3. Set Manageable Goals

    If you have a full time job and work 50-60 hours a week are you really going to spend your weekend reading an entire text book? I really hope not! Get a proper todo-list manager (I’m liking Remember The Milk) and make some lists. Set repeating tasks that are manageable. Manageable is key, because once you get behind you probably won’t be able to catch up. I feel that a backlog of a week’s daily repeating tasks should be able to be cleared in one day focused on them – but that’s not a scientific measurement.  Also, as a grad student my schedule is somewhat different.

    A really useful aspect of a todo list, is if you get home feeling drained knowing you should do something productive but incapable of deciding what – the todo list will decide for you. Do it, and you’ve achieved something more than just watching TV. Consider the warm glow this gives you a gift. I do this when I’m feeling overwhelmed, just pick the top-priority task of the list. Or pick an easy “repeating” task to warm up and gear me up to being productive.

    4. Put Those Goals in Public

    I’m finding my Week in Brief really helpful. I put my goals in public and that makes me accountable. I also evaluate what my high level goals for the week are. As a graduate student, I only answer to my supervisor but he’s just concerned that I’m making progress – he doesn’t prescribe what that progress should be. Once I’ve written the list for the coming week I can evaluate how the tasks I’ve set myself fall into my “roles” (grad student, TA, blogger, President of WISE). At the end of the week when I evaluate what I’ve checked off and what I haven’t managed, I can see whether I’ve devoted too much time to one “role” at the expense of another, and when I look at what I have managed I can take a moment to be proud of what I have achieved this week. A Masters Thesis is this big, long-off goal, but I know that if I chip away at it week in week out, I’ll get there.

    If you don’t want to announce your todo list on your blog, you can always share it with a friend and get them to motivate you!

    5. Focus on What’s Important

    Now you’ve got your life in order, you need to stop it getting out of hand again! New opportunities, people, and activities are great but do they help you achieve your longer-term goals or distract you from them? For instance, I get really drained by people who enjoy an argument. Not, as in, a good debate, but deliberately taking a (relatively unimportant) point of contention and making it into a time consuming argument which just leaves me frustrated and bored. One of my friends really enjoys these, but after I finished one the other day with “I’m going to go and have a more productive conversation with a brick wall” we’ve agreed that he’ll stop having them with me.

    6. It’s not All or Nothing

    Finding a degree of balance in your life is hard, and there’s debate on whether or not it’s a good idea (I wrote more about my personal findings on happiness in this post). But I really don’t believe that having a boyfriend or girlfriend need negatively impact your professional life. My boyfriend is incredibly supportive with everything I do for WISE, and honestly I wouldn’t have achieved as much there without his advice and support. He’s President of IGADI (CS Grad Association), and I encouraged him to go for that. He wasn’t wild about me going to China, but he supported me in it (and never said “I told you so” when I got frustrated). I’ve dated more than my share of idiots and possessives, but my experience in a stable and balanced relationship is that we build each other up and achieve more.

    7. It’s OK not to be Super-Human

    I’ve been reading Stumbling on Happiness lately and it’s really insightful. Losing control did make me miserable, and I’ve realized that when I imagine the future it’s one where I sleep a maximum of 4 hours a night (I think I’m fairly productive, but in my imagined future I achieve new, unimagined levels of productivity and there are never unforseen setbacks). I’m starting to try to imagine the future in a more rational, balanced way. I probably won’t become an uber-productive cyborg, but that’s OK. I expect uber-productive cyborgs don’t have that many friends, anyway.

  • Efficiency

    At the moment, I’m taking a class in Combinatorial Algorithms. You can probably gather from the things that I write about here that this is not my passion… however so far it’s better than expected. We’re moving onto backtracking. If you know a functional language such as Haskell or ML (I know there are others, these are just the two I know) backtracking is fairly easy, so of course I ask if we can use such a functional language for our assignment. So then this exchange happens (of course I Twittered it):

    Student: Why are you talking about functional programming?

    Professor: Oh… she’s European.

    Ah yes, we Europeans like to sit in cafe’s drinking espresso and talking about politics, philosophy, functional programming…

    For our current assignment, one of the questions was to write a program that would produce all the “derangements” for a given number: a derangement is like a permutation except none of the elements are in the original position (see the table at the end of the post). There are fewer than 6 students in the class and two of them mentioned to me that they found this question difficult. However I wrote it in Haskell, and it took me 8 lines of code and 2 hours (the first chunk of which was spent getting to grips with the syntax again – it’s been a while) and runs really fast. See below:

    Note – I’m not concerned about putting this up before I’ve handed it in, as there are very few students in the class and I’m confident none of the others know Haskell

    -- Cate Huston - Question 3
    
    import Data.List
    
    derange :: Int -> [[Int]]
    derange n = iter (n-1) (permutations (makeList n))
    
    makeList :: Int -> [Int]
    makeList 0 = []
    makeList n = makeList (n-1) ++ [n]
    
    iter :: Int -> [[Int]] -> [[Int]]
    iter 0 ls = remove 0 ls
    iter a ls = iter (a-1) (remove a ls)
    
    remove :: Int -> [[Int]] -> [[Int]]
    remove _ [] = []
    remove a (l:ls) = if (l!!(a) == (a+1)) then remove a ls
                      else l : (remove a ls)

    This code is efficient, in the sense that it didn’t take me very long, but it’s also very efficient to run because of the way Haskell uses lazy evaluation, so things are not created (or computed) until it’s necessary. So even though it looks, for instance, that creating a list of permutations is one of the first things I’m doing, in practice it’s something that happens very shortly before the relevant permutation does (or doesn’t) appear on my screen.

    Computer Science (or Informatics) at the University of Edinburgh wasn’t always the most fun experience but here’s what I’m grateful for: I’ve programmed in 9 languages. And whilst I’m not particularly confident in all of them, I know enough about each of them to have an appreciation for when it’s appropriate. I think Haskell is most appropriate in this instance, for example, but I’m using Java for my visualizations. If I need to script something, I’ll probably use Python and I understand why C is still used a lot, but also why it’s difficult to code in (and so very, very difficult to teach a beginner). The only thing I still don’t get is Tcl (everything’s a String! Everything! Why?).

    This makes me more efficient as a programmer, in that I have more choice to fine the best language for what I’m doing, and also in that I’m not afraid to learn another language and I don’t get fazed by the syntax being different. Yesterday, for example, I debugged someone’s Visual Basic code. I’ve not really done any VB before (since 2004 I’ve only used Windows when someone’s paid me to), but type errors are type errors so it didn’t take long to fix.

    Programmers – we need to stop clinging to the one language we know (primarily Java, I’ve found) and thinking we can do everything in it. It’s probably possible, but there might be a better way. And in 10 years time, will Java still be this popular or will something have surpassed it? We need to have the skills to move on, if the need arises.

    Derangements – all of these (and 7 – not shown) ran in well under 1s

    1 []
    2 [2,1]
    3 [2,3,1],[3,1,2]
    4 [4,3,2,1],[3,4,2,1],[2,3,4,1],[4,1,2,3],[2,4,1,3],[2,1,4,3],[4,3,1,2],[3,4,1,2],[3,1,4,2]
    5 [4,3,5,2,1],[4,3,2,5,1],[5,3,4,2,1],[3,5,4,2,1],[3,4,5,2,1],[3,4,2,5,1],[2,3,4,5,1],[2,5,4,3,1],[2,4,5,3,1],[5,4,2,3,1],[4,5,2,3,1],[5,1,2,3,4],[2,5,1,3,4],[2,1,5,3,4],[2,3,5,1,4],[2,3,1,5,4],[5,3,1,2,4],[3,5,1,2,4],[3,1,5,2,4],[3,1,2,5,4],[5,3,2,1,4],[3,5,2,1,4],[5,1,4,3,2],[5,4,1,3,2],[4,5,1,3,2],[4,1,5,3,2],[4,3,5,1,2],[4,3,1,5,2],[3,1,4,5,2],[5,3,4,1,2],[3,5,4,1,2],[3,4,5,1,2],[3,4,1,5,2],[5,1,4,2,3],[5,4,1,2,3],[4,5,1,2,3],[4,1,5,2,3],[4,1,2,5,3],[5,4,2,1,3],[4,5,2,1,3],[2,1,4,5,3],[2,5,4,1,3],[2,4,5,1,3],[2,4,1,5,3]
    6 [6,5,4,3,2,1],[5,6,4,3,2,1],[5,4,6,3,2,1],[6,4,5,3,2,1],[4,6,5,3,2,1],[4,5,6,3,2,1],[6,3,4,5,2,1],[3,6,4,5,2,1],[3,4,6,5,2,1],[3,4,5,6,2,1],[3,4,5,2,6,1],[4,3,6,5,2,1],[4,3,5,6,2,1],[4,3,5,2,6,1],[3,5,4,6,2,1],[3,5,4,2,6,1],[5,3,4,6,2,1],[5,3,4,2,6,1],[2,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