Profile

Cover photo
Ammar Khaku
Works at Evernote
Attended Tufts University School of Engineering
Lives in San Francisco, CA
158 followers|94,861 views
AboutPostsPhotosVideos

Stream

Ammar Khaku

Shared publicly  - 
1
Matt Russell's profile photo
 
I've never even heard of for-each-ref haha. Now I've got some reading to do...
Add a comment...

Ammar Khaku

Shared publicly  - 
 
This is where I work :) 
2
Mohammad Taimoor Siddiqui's profile photoNaveed Pasha's profile photo
2 comments
 
Woah nice place man :D 
Add a comment...

Ammar Khaku

Shared publicly  - 
 
Very real problem
 
Do you feel lonely working online?
1
Seth Rattan's profile photo
 
I make a point allocate at least 20 minutes of every day talking with someone about something other than CompSci. Not always necessary, but it kept me sane during Comp 40 and 105...
Add a comment...

Ammar Khaku

Shared publicly  - 
 
Interesting commentary on undergraduate computer science curricula
 
Now that I'm at the helm teaching Software Engineering, it is my responsibility to make sure that it is taught right and real (that is, bridging the gap between academialand and the professional world).  Quite frankly, Software Engineering is a subject that is typically taught badly in academialand.  While doing some searching on SE, I ran into this gem.  Interesting enough, the top answer was from a colleague of mine.  This kept me up for a while.  My comments on every one of his points made:

Universities should teach distributed source control starting with the first programming course. It is a fine way to distribute code to students; they can get bug fixes easily. In later courses they can use it to help support pair programming. We should treat it as easy, make it a habit, and not make a big fuss about it.

Agreed.  I remember how bad the problem used to be: a few years ago, seniors had no clue what revision control was.  It is now used to some extent in the first, second, and third courses in the Computer Science major.  I require students to use Git in my Web Programming (for their semester project), Web Engineering (for everything including assignment submissions), Game Development (for their 2D game team project), and for senior capstone projects.  Although the choice of revision control can lead into a flame war, the key is to make using a revision control a habit.  Without it, you're f***ed in the professional world when you develop software in a team: no one will know what you did and you will not remember what you did.

Universities should not teach configuration management. There is no consensus on what tools should be used or how they should be used. The dominant tools are either proprietary (Visual Studio) or far too complex to teach to beginning students (GNU Make). I have recently stopped using make in my classes, and life is easier for everyone. Students compile all their source code, every time, using a shell script.

No consensus on what tools is correct.  However, the key is to make a build in one step.  Read the Joel Test at http://www.joelonsoftware.com/articles/fog0000000043.html. The idea is simple: "If the process takes any more than one step, it is prone to errors."

It is nearly impossible to teach integration at university, let alone continuous integration, because everything has to be broken up into course-sized units of 10 to 14 weeks. Even worse, within a single course, programming work is typically broken into small pieces, each of which takes at most a few weeks to complete. These constraints militate strongly against learning how to integrate systems.

So true.  The problem can be made worse significantly by distributing the pieces to different teams of students, each team use different standards, and then the nightmare of communications.  I've been down that road before in a Compilers class back in the days (circa 2003) and it was a complete failure (yes, teams had to build a component of a compiler, then integrated it all into a compiler in the last month of the class).  The idea never worked then and it will never work now.

Code readability should be taught from the first programming course and should continue to play a role through graduation. In both my introductory courses and my upper-division undergraduate courses, about half students' homework grade is for readability.

I stress to students every semester, especially in the second intro course in the curriculum (Data Structures), that I should read your code like an English paper.  It was something I learned when I was in high school and I'm still a firm believer in that idea.

Programming methodology is another essential topic that should be taught at university, but perhaps not in the way you think. If university graduates really understand data abstraction, criteria for decomposing systems into modules, data-driven design, and maybe stepwise refinement, they are doing well. Yes, all this was understood by professionals as long ago as 1980, but these ideas are still fundamental, and I am confident of their lasting value.

Spot on.  The languages and frameworks that you will use will change over time.  However, the seminal ideas of data abstraction, data-driven design, module decomposition, and stepwise refinements will never go away.  Linus Torvalds once said "Bad programmers worry about the code. Good programmers worry about data structures and their relationships."

Regarding some of the other stuff out there, UML does not have a foundation of lasting value, design patterns are a culture, not a methodology, and (this last backed up by experience) the design of class hierarchies and the use of inheritance is too advanced a topic for most undergraduate students.

I still don't know what the f*** UML really is.

I don't see that bug tracking has enough substance to be taught at university, and I don't see any obvious situations where students would find it helpful to use bug-tracking tools. There's a big contrast with source control, where the opportunities and benefits are obvious.

It doesn't hurt to expose students to bug tracking as all good software shops will use it.  The value of bug tracking is to keep a knowledge base of bugs made in the past and hopefully it will lead to higher quality software.  What is even more important is to expose students to write a clear and meaningful bug report.  This isn't a terribly difficult exercise but the reasoning for this is simple: too many students are walking out of college with weaker writing skills and quite frankly I see too many junior developers can't even writing a damn note!
1
Add a comment...

Ammar Khaku

Shared publicly  - 
 
Ah, I wish I could go back to doing straight python
 
Some patterns for fast Python. Know any others?

- Avoid overengineering datastructures. Tuples are better than objects (try namedtuple too though). Prefer simple fields over getter/setter functions.

- Built-in datatypes are your friends. Use more numbers, strings, tuples, lists, sets, dicts. Also check out the collections library, esp. deque.

- Be suspicious of function/method calls; creating a stack frame is expensive.

- Don't write Java (or C++, or Javascript, ...) in Python.

- Are you sure it's too slow? Profile before optimizing!

- The universal speed-up is rewriting small bits of code in C. Do this only when all else fails.
1
Add a comment...
Have him in circles
158 people
Jordan King's profile photo
Sanchit Gupta's profile photo
Wenshiang Sean Chung's profile photo
Neha Kumar's profile photo
Rushabh Shah's profile photo
Jason Cheng's profile photo
Pavan Nyama's profile photo
Lindsey Smith's profile photo

Ammar Khaku

Shared publicly  - 
 
Looking for resources on the operational semantics of javascript. Help?
+Norman Ramsey +Ben Hescott +Ming Chow 
1
Norman Ramsey's profile photoAmmar Khaku's profile photo
2 comments
 
Thanks Ming and Norman, both pretty good resources
Add a comment...

Ammar Khaku

Shared publicly  - 
1
Add a comment...

Ammar Khaku

Shared publicly  - 
1
Add a comment...

Ammar Khaku

Shared publicly  - 
 
What a fantastic use of time
 
So instead of sleeping I decided to write a script to pull down and stitch together the incredible #XKCD images from http://xkcd.com/1110

Got to hand it to +Randall Munroe , this was an amazing feat.

The tiles are 2048x2048 pixels, and the map is 80 tiles wide, and 32 tiles tall.  The scale of this thing is crazy. It's 163,840 x 65536 pixels, which makes it a 10 GIGA-Pixel image!

The coolest part I thought was that most of the tiles could be empty, and they just 404 error in the background since they don't exist, but the script doesn't care. It just paints it black below the horizon, or white above.


Also of note, I stiched them together with HTML5 canvas then got the image from Canvas.toDataURL().
Firefox and Chrome both barfed on 225 (non-empty) huge tiles, so i had to scale them down first with mogrify to 64x64 to even paint the thing on a 5120x2048 canvas.

Here's the still way scaled down (1/32) 5120x2048 version:  http://goo.gl/TDol9
1
Add a comment...
People
Have him in circles
158 people
Jordan King's profile photo
Sanchit Gupta's profile photo
Wenshiang Sean Chung's profile photo
Neha Kumar's profile photo
Rushabh Shah's profile photo
Jason Cheng's profile photo
Pavan Nyama's profile photo
Lindsey Smith's profile photo
Work
Employment
  • Evernote
    2012 - present
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
San Francisco, CA
Previously
Somerville, MA
Apps with Google+ Sign-in
Story
Tagline
Rabid developer
Bragging rights
command line magician
Education
  • Tufts University School of Engineering
    Mechanical Engineering and Computer Science, 2008 - 2012
Basic Information
Gender
Male