Knowing .NET Sometimes a coder who writes, sometimes a writer who codes. Formerly, a coder who edited magazines.

September 28, 2010

Yavin IV: Exploring space on the cheap with an iPhone, Droid, and Flip

Filed under: Uncategorized — larry @ 10:52 am

Yavin IV: Exploring space on the cheap with an iPhone, Droid, and Flip.

Apparently, even on a very windy day, you can send a weather balloon up 100,000′ and when it bursts and you parachute the payload down, you’ve still only covered about 75 miles. Hmm….

September 27, 2010

WordPress 3.0 “Thelonious” Launched

Filed under: Uncategorized — larry @ 8:26 am

WordPress › WordPress 3.0 “Thelonious”.

This is a major update, but it looks like to take advantage of several of the components, you have to switch to the default “2010” theme.

September 24, 2010

Household Net Worth off $12.3 Trillion from Peak

Filed under: Offtopic — larry @ 8:28 am

Calculated Risk: Q2 Flow of Funds: Household Net Worth off $12.3 Trillion from Peak.

Not that lost equity has to be paid off (although I knew too many people who used their homes as ATMs during the early 00s), but just in terms of morale, the loss of $12.3T goes a long way to explain the roiling discontent in the US.

September 23, 2010

FunLoft: Reactive Concurrent Programming Language

Filed under: Concurrency,Languages — larry @ 6:33 am

It sounds like someone designed a programming language with the express intention of intriguing me:

FunLoft is an experimental language for concurrent programming, designed with the following objectives:

  • make concurrent programming simpler by providing a framework with a clear and sound semantics.
  • provide a safe language, in which, for example, data-races are impossible.
  • control the use of resources (CPU and memory); for example, memory leaks cannot occur in FunLoft programs, which always react in finite time.
  • have an efficient implementation which can deal with large numbers of concurrent components.
  • benefit from the real parallelism offered by multicore machines.

… FunLoft is based on a programming model which is a variant of reactive programming

September 22, 2010

Wordless Wednesdays: God, I Hate Nature Photography

Filed under: Uncategorized — larry @ 6:45 am

September 21, 2010

Guilty as Charged: The Cult of Busy

Filed under: Uncategorized — larry @ 6:11 am

The cult of busy « Scott Berkun.

This rings absolutely true to me.

September 20, 2010

Machine-Translated Joke From My Spam Inbox

Filed under: Uncategorized — larry @ 2:42 pm
A altogether inebriated people was stumbling down the passage with equal foot on the repress and an individual foot in the gutter. A cop pulled up and said, “I’ve got to take you in, pal. You’re doubtlessly drunk.”
Our wasted friend asked, “Office-bearer, are ya absolutely stable I’m drunk?”
“Yeah, buddy, I’m sure,” said the copper. “Betray’s go.”
Breathing a mourn of projection, the wino said, “Acknowledge gratitude goodness, I thought I was crippled.”

Whiteboard Coding During the Software Interview Process

Filed under: Uncategorized — larry @ 10:15 am

Part of the interviewing process for a software development job is “coding on the whiteboard.” Some simple-enough-to-understand problem (such as “FizzBuzz“) that shows whether you grok coding or whether you’re wasting everyone’s time.

The first threshold is understanding that it’s foolish to memorize specific “interview code problems,” which is, pitifully, something that you see on programmer discussion boards every once in a while.

You can however, do a few simple things that can greatly improve your performance during the job interview:

Take a deep breath

Interviewing problems are always a little tricky — “Hello, World!” doesn’t prove anything and there isn’t space on the whiteboard for you to write a Sudoku solver. So interviewing problems will be deceptively easy to grasp. The first thing you write down will not work — that’s the point! Even if you happen to have coded that problem while waiting in the lobby, they’ll just say “Oh, ok. Well, how about this problem…” and give you something else.

Take a deep breath. Ask for a clarification or two, even if it’s just restating something that was explicitly said: “So, if it’s divisible by both 3 and 5, write ‘FizzBuzz’?”

Stay true to your principles

Do you believe in tests? Put them on the board first! You don’t have to implement a test suite, but if you believe that unit-testing is part-and-parcel of how you should develop, put up some initial input-output pairs.

Do you believe in a source-control workflow? Then at least saygit init, git checkout -b develop, git checkout -b firstfeature.” (If they say ‘No initial add & commit?’ then you win!) Continuous integration? Same thing — just give a shout-out to your understanding of the programming context and not the programming task at hand.

Refactoring? Coding style? Documentation? Whiteboards aren’t conducive to showing these things, but demonstrating your concern for these things will show that you take this profession and your work seriously. But since they are hard to demonstrate on a whiteboard, you should concentrate on…

Talk. Code. Talk. Code. Fire & Displace.

This is a hard one if you, like most programmers, are not used to pair-programming. But realize that whatever problem they’ve given you is the equivalent of a videogame level — you’re going to get fragged at least once. As I said, if you don’t hit a problem, they’re just going to give you a trickier task. So, understanding that you’re going to get fragged, let them know that the reason you’re advancing down this corridor is not because you’re stupid, but because you’re aggressive .

Of course, just like in an FPS, you don’t want to be the person who takes five minutes to scope every corner near the elevator — you want to show your aggression. So don’t just talk — get code on the board. Does it work? Check your tests you wrote down. Green light? Refactor or at least shout out to adjusting things. Move forward. (Just as I’m now tempted to refactor this whole post into ‘Whiteboard coding as Halo level…’ but will resist, at least for now…)

Drill in List Processing

I actually began this post wanting to give this one piece of advice. Because it’s really one thing you can do to prepare for a whiteboard coding session and not just advice for the moment at hand. If you want to do one thing to improve your chances at solving an interviewing programming challenge, make sure that you’ve spent a few days in the previous week deeply immersed in processing lists using fold, map, and filter (or their equivalents in whatever language you will be coding in). Practice saying out loud “By applying that to the head of the list and then applying it recursively to the rest of the list, we get something like…”

Even if the language you’re asked to code in doesn’t have higher-order functions, if you can say “Well, I’d approach it like this in [Lisp | … | Python]” you’re going to show that you can think like a programmer, which is the real challenge.

And, for what it’s worth, most whiteboard challenges probably can be solved on a single whiteboard with higher-order functions.

P.S. Use higher-order functions even if being asked to “consider performance.” Once upon a time, that consideration would have pushed you towards imperative code. I will admit that I fell into this trap just recently, talking about my concern for memory allocation and cache coherence, when in fact I would have been closer to the ideal solution with the higher-order approach and the magic phrase “Distributed MapReduce” (or the more general principle that in the manycore and cloud era, divide-and-conquer is the key to Big Data).

P.P.S. If you’re interviewing for a position writing GPU shaders, you may need to temper your use of recursion. On the other hand, if you’re interviewing for a position writing GPU shaders, the whole “Think of coding as a Spartan clearing a level of Grunts and Brutes” is  probably all you need…

XKCD Comic Rings True

Filed under: Uncategorized — larry @ 8:04 am

I have to admit that I think about this every time the subject of shark attacks and SCUBA diving comes up:

xkcd: Conditional Risk.

Entropy always increases: Visualising sorting algorithms

Filed under: Concurrency — larry @ 6:06 am

Entropy always increases: Visualising sorting algorithms.

Lovely way of visualizing sorting. I especially like the visualization of the “divide and conquer” algorithm:

Older Posts »

Powered by WordPress