Friday, April 15, 2011
I am ridiculous, I suppose
The title of the article is "The most ridiculous job interview questions".
The first question is
The answer, of course, is lg 1000, where lg is log base 2. Something any programmer should be able to answer in under two seconds, more or less, I would think. Though I have seen some people in my classes flub that one pretty badly.
The first question is
"Given the numbers 1 to 1,000, what is the minimum number of guesses needed to find a specific number, if you are given the hint 'higher' or 'lower' for each guess you make?" -- Facebook
The answer, of course, is lg 1000, where lg is log base 2. Something any programmer should be able to answer in under two seconds, more or less, I would think. Though I have seen some people in my classes flub that one pretty badly.
Labels: humor, programming
Wednesday, May 21, 2008
A slow bug fix
The code was only broken for 25 years. Not so significant in geological terms.
Labels: computers, humor, programming
Wednesday, April 30, 2008
Learning Hebrew's finally paying off
When Kaplan titles one of his posts Why WC2MB needs a CP, chaver sheli!, I actually know what's going on. Nice.
Labels: jewish, programming
Tuesday, April 29, 2008
Another reason not to use ReiserFS
Hans Reiser, 44, bowed his head in court as the jury found him guilty of a crime that carries a sentence of 25 years to life in prison.
Nina Reiser disappeared more than a year ago after dropping off the couple's children at Hans Reiser's home. Her body has never been found.
Reiser, known in programming circles as creator of the ReiserFS computer file system, testified for several days in the six-month trial, often giving rambling answers and getting scolded by the judge for arguing with the prosecutor.
Labels: programming
Sunday, April 27, 2008
Argh
I just spent an hour and a half taking a Microsoft course entitled "Office Live for Developers", some required training for a program I'm enrolled in with them. When I completed the test and went to my training page, it had somehow given me a score of 100% for a course "Office Live for Small Business Specialists". Interesting. I tried to go into the test again and submit it again, at which point it was marked as completed with a score of 0%. Nice.
Labels: programming
Friday, April 25, 2008
Churning code
Why can't Big Blue be like Hewlett-Packard, which has driven its HP 3000 customers crazy by trying for years to kill off their minicomputers? HP stopped selling the machine in 2003 and has attempted to drive a stake through its heart ever since. Sure, those users have managed to pressure HP into extending some level of support until the end of 2010. But they're living under a death sentence, and they know it.
Like IBM, those users don't get it. We in IT have a blueprint, a road map, a grand plan. It's based on best practices, industry standards and everything else that will make the IT department look slick, smart and visionary — especially in the eyes of IT industry deep-thinkers.
Keeping legacy applications alive just because they're crucial to the business? Keeping legacy minicomputers going just because that's the only way to run those legacy apps? What kind of IT best practice is that?
Sometimes I think the crazy to get off of 'old' languages is a combination of two things - a desire not to have to learn new things and a desire to have a job. Certainly there may be many advantages to rewriting something written in assembler or (shudder) RPG in a snazzy new language. If you have a critical business system written in unstructured BASIC, by all means dump it. But, as Joel is fond of pointing out, code doesn't rust. In general, it gets better with time. If it doesn't, you can fix it. No need to start from scratch.
Labels: computers, programming, work
Thursday, April 17, 2008
Ever wanted to build a media player in Excel?
Of course you have! I have often yearned to implement not only critical financial systems but also entertainment software in Excel.
Bonus points if you can modify the example so that there's a waveform chart.
Bonus points if you can modify the example so that there's a waveform chart.
Labels: fun, programming
Monday, April 14, 2008
"gets"
While doing some programming in C, I came across the function "gets", to get a string from the user. Sadly, it came with a nice warning about how it should never be used because it doesn't check for buffer length. What a nice standard.
Labels: programming
Wednesday, February 20, 2008
Office files may be hard to parse
But that doesn't mean Microsoft is evil. It just means that Microsoft wrote them for a very different world and has been forced to keep them going to avoid chaos in the business world.
Labels: computers, programming
Wednesday, January 23, 2008
A little bit about time
Labels: computers, fun, programming
Wednesday, December 19, 2007
Shuffling
Not as simple as you would think. I for one would be very hesitant before stepping into any program that required random numbers. Way too easy to mess up and lose money - e.g.:
By synchronizing our clock with the clock on the online casino and hitting the "shuffle" button, our program can calculate the exact shuffle. That means we know all the cards that have yet to appear, everyone's hand, and who will win.
Labels: programming
Thursday, December 13, 2007
How do normal people sort?
Jeff Atwood's blog about sorting now has a response from Ian Griffiths.
Both of them ignore one of my pet peeves. For centuries, people alphabetized words and phrases by ignoring spaces and punctuation. For example, "Newark" would come before "New York." Computers changed all that, and I think for the worse.
How to know you've been at work too long: You can't imagine why Newark would sort before New York.
Labels: computers, programming
Monday, September 17, 2007
Quote of the Day
Computer Science is no more about computers than astronomy is about
telescopes.
- Edsger Dijkstra
telescopes.
- Edsger Dijkstra
Labels: computers, programming, quotes
Wednesday, June 20, 2007
Now that's what IT is all about
In the mid 90s, Ken W. was working in the distribution center of a large commercial printing company. Since the department didn't generate any revenue, it was treated as a cost center. As such, getting purchases approved had a difficulty level somewhere between squeezing a camel through the eye of a needle and being rich and getting into heaven.
Since the printing branch was sending order information in Word documents or Excel spreadsheets, the distribution center needed Office licenses. Office costs more than $0, however, and the vehement opposition to approving purchase requests trumped the need for the software.
All that and you still have to make it work. Quite an inspiring story. Not as inspiring as, say, the Gospel according to John, but not bad overall.
Labels: programming
Wednesday, March 21, 2007
A decent question
Why Can't Programmers Program?
In my experience, it's because people who don't get what's going on can still pass class. I'm not one to get huffy and puffy if people don't grok references and pointers at first, as long as they are required to do a large project in C before they graduate, which will . . . help them to brush up, so to speak. But really, if you're at a JavaSchool, you can get your degree without understanding what's going on. Scary.
In my experience, it's because people who don't get what's going on can still pass class. I'm not one to get huffy and puffy if people don't grok references and pointers at first, as long as they are required to do a large project in C before they graduate, which will . . . help them to brush up, so to speak. But really, if you're at a JavaSchool, you can get your degree without understanding what's going on. Scary.
Labels: programming
Sunday, March 11, 2007
Time and computers
A brief discussion of Unix timekeeping on this Sunday evening. Perhaps not a religious topic, but a brief perusal of the article should be enough to bring any man to thanksgiving that he doesn't have to work with such things.
Labels: programming
Sunday, February 11, 2007
What it is isn't always what you expect
An article from the great Eric Lippert on how finally blocks are called after exception filters, meaning that they execute before any state fixing up that you might be doing in your finally block. Most people find the behaviour bizarre, but as one commentator put it, it is a finally block, not an immediately block.
I believe there is a connection to the spiritual life here, though it may be silly. What I mean to say is that things are often extremely nonintuitive , and the most 'obvious' things are sometimes the most false when it comes to human relationships and the workings of out own minds.
Moral of the story? In a secure context, catch exceptions instead of relying on finally blocks. Also, put brain in gear before engaging mouth.
I believe there is a connection to the spiritual life here, though it may be silly. What I mean to say is that things are often extremely nonintuitive , and the most 'obvious' things are sometimes the most false when it comes to human relationships and the workings of out own minds.
Moral of the story? In a secure context, catch exceptions instead of relying on finally blocks. Also, put brain in gear before engaging mouth.
Labels: programming, religion


