Archive for the 'programming' Category

An App A Day

Tuesday, October 10th, 2006

Dana Hanna, who calls himself a Software Jedi, is writing a windows application a day for 30 days. He has already finished 25 apps. A number of the apps are actually quite useful, like the Jedi Window Dock which allows you to dock a bunch of applications into a single tabbed window. And best of all, all of the C# source code is available under the GPL.

I plan on writing an application everyday for 30 days straight. May the world benefit from the purposeful destruction of my personal life. I’m writing apps as of 9/15/2006.

Update: The Software Jedi has created a new website to host the applications he created, here.

Good Agile, Bad Agile

Wednesday, October 4th, 2006

Steve Yegge has written a long but entertaining rant on the problems with the “Agile” programming fad, as well as providing a fascinating look inside Google culture.

You know. Chumps. That’s the word I’m looking for. My bad-cholesterol view was that Agile Methodologies are for chumps.

But I’ve had a lot of opportunity to observe various flavors of Agile-ism in action lately, and I now think I was only about 90% right. It turns out there’s a good kind of Agile, although it’s taken me a long time to be able to see it clearly amidst all the hype and kowtowing and moaning feverishly about scrums and whatnot. I have a pretty clear picture of it now.

Ruby Metaprogramming techniques

Sunday, September 24th, 2006

This is a useful article on metaprogramming idioms in Ruby.

I have been thinking much about Metaprogramming lately. I have come to the conclusion that I would like to see more examples and explanations of these techniques. For good or bad, metaprogramming has entered the Ruby community as the standard way of accomplishing various tasks, and to compress code. Since I couldn’t find any good resources of this kind, I will start the ball running by writing about some common Ruby techniques. These tips are probably most useful for programmers that come to Ruby from another language or haven’t experienced the joy of Ruby Metaprogramming yet.

dzone - link-sharing community for developers

Friday, September 15th, 2006

This site is similar to Digg but it is aimed at software and web developers.

Borland Turbo Explorer editions

Friday, September 15th, 2006

Borland has recently released a number of free (as in beer) Turbo Explorer edition developer tools (Turbo Delphi, Turbo Delphi for .NET, Turbo C++, and Turbo C#). They also offer Pro versions which you have to pay for.

Note that according to their site, you can only install one of the Explorer editions on a machine, and you also cannot install the Turbo editions if you already have Borland Developer Studio installed.

You will also need to register for an installation key from Borland’s download site.

From Hobby to Independent Software Vendor

Wednesday, September 13th, 2006

I came across this link on reddit and discovered a number of inspirational accounts of developers who took the plunge from writing software in their spare time to building relatively successful ISV businesses. Well worth a read.

From The Road Less Traveled:

When discussing the indie dream much fuss is made about “making the leap.” This idiom can be applied to many risk-taking situations, but in this context it usually refers to that fateful day when an individual decides to stop receiving a steady paycheck, in favor of some pursuit which probably offers less certain financial rewards.

Your familiarity with the phrase is inextricably linked with another well-worn utterance: “don’t quit your day job.” This phrase probably started as a cautious piece of well-meaning advice, but has evolved into a nasty weapon, used by terminally unhappy people to assassinate the dreams of those who aspire to something different.

Pathological Programming: The Worlds Smallest Programming Language

Sunday, September 10th, 2006

If you think the Brainfuck programming language is twisted, how about a language with only two symbols?

For todays dose of pathological programming, we’re going to hit the worlds simplest language. A Turing-complete programming language with exactly two characters, no variables, and no numbers. It’s called Iota. And rather than bothering with the rather annoying Iota compiler, we’ll just use an even more twisted language called Lazy-K, which can run Iota programs, Unlambda programs, as well as its own syntax.

Learning GNU Make Functions with Arithmetic

Sunday, September 10th, 2006

This article shows you how you can evaluate arithmetic expressions using GNU make, and even includes an implementation of a reverse polish notation calculator. Not only did the author spend the time to come up with this wild hack, but then he wrote an article about it!

GNU Make has no built-in arithmetic capability. In this article I present a collection of GNU Make macros that implement functions for addition, subtraction, multiplication, and division of integers. Functions are also provided for integer comparisons such as “greater than” and “not equal.” These macros are implemented entirely using GNU Make’s built-in string manipulation functions.

An Algorithm for Compressing Space and Time

Wednesday, July 26th, 2006

This article presents a significant optimization for Conway’s Game of Life.

Making a slow program fast can lead to both joy and frustration. Frequently, the best you can do is a low-level trick to double or maybe quadruple the speed of a program; for instance, many readers may have implemented John Conway’s “Game of Life” using bit-level operations for a significant speedup. But sometimes a whole new approach, combining just a few ideas, yields amazing improvements. A simple algorithm called “HashLife,” invented by William Gosper (”Exploiting Regularities in Large Cellular Spaces,” Physica 10D, 1984), combines quadtrees and memoization to yield astronomical speedup to the Game of Life. In this article, I evolve the simplest Life implementation into this algorithm, explain how it works, and run some universes for trillions of generations as they grow to billions of cells.

Stiff asks, great programmers answer

Monday, July 24th, 2006

The author of this article sent out some questions to a number of notable programmers, and has posted the responses that were sent back.

Starring:

Linus Torvalds - The Linux kernel author

Dave Thomas - Author of the „Pragmmatic Programmer”, „Programming Ruby” and other great books about programming. One can read his mainly programming-related thoughts here.

David Heinemeier Hansson - Author of the Rails Framework - the new hot web development framework. He has a weblog here.

Steve Yegge - Proably the least known from guys here, but also made one of the most interestings answers, has a popular weblog about programming. He is also the author of a game called „Wyvern”.

Peter Norvig - Research Director at Google, a well known Lisper, author of famous (in some circles at least) books about AI. See his homepage.

Guido Van Rossum - The Python language creator

James Gosling - The Java language creator

Tim Bray - One of the XML and Atom specifications author and a blogger too.

Separating Programming Sheep from Non-Programming Goats

Wednesday, July 19th, 2006

An academic paper has been generating quite a bit of discussion lately. It proposes an aptitude test to determine if you can be taught to program, based on the assumption that not everyone has an ability to learn and understand formal systems.

A bunch of people have linked to this academic paper, which proposes a way to seperate programming sheep from non-programming goats in computer science classes– long before the students have ever touched a program or a programming language:

All teachers of programming find that their results display a ‘double hump’. It is as if there are two populations: those who can [program], and those who cannot [program], each with its own independent bell curve. Almost all research into programming teaching and learning have concentrated on teaching: change the language, change the application area, use an IDE and work on motivation. None of it works, and the double hump persists. We have a test which picks out the population that can program, before the course begins. We can pick apart the double hump. You probably don’t believe this, but you will after you hear the talk. We don’t know exactly how/why it works, but we have some good theories.

Why I hate programming competitions

Wednesday, July 19th, 2006

An essay on why being good at programming competitions doesn’t make you a good programmer.

Almost all programming competitions have the same format. A number of relatively short problems are posed to the contestants. They have to come up with algorithms and working code that implements those algorithms. The test of the resulting code is whether it works at all, and if so, how fast it is. There is a time limit which is generally quite short. And that’s all.

Update (2006-07-19 11:31): fixed missing link. Oops.

The Vietnam of Computer Science

Saturday, July 1st, 2006

Ted Neward has written a thought-provoking article on the Object-Relational mapping problem.

No armed conflict in US history haunts the American military more than Vietnam. So many divergent elements coalesced to create the most decisive turning point in modern American history that it defies any layman’s attempt to tease them apart. And yet, the story of Vietnam is fundamentally a simple one: The United States began a military project with simple yet unclear and conflicting goals, and quickly became enmeshed in a quagmire that not only brought down two governments (one legally, one through force of arms), but also deeply scarred American military doctrine for the next four decades (at least).

Although it may seem trite to say it, Object/Relational Mapping is the Vietnam of Computer Science. It represents a quagmire which starts well, gets more complicated as time passes, and before long entraps its users in a commitment that has no clear demarcation point, no clear win conditions, and no clear exit strategy.

Microsoft Robotics Studio

Tuesday, June 20th, 2006

Microsoft has released a robotics development environment, currently available for free download. It appears to be targeted for the Lego Mindstorms RCX, Lego Mindstorms NXT, and fishertechnik systems.

The Microsoft Robotics Studio is a Windows-based environment for academic, hobbyist and commercial developers to easily create robotics applications across a wide variety of hardware. Key features and benefits of the Microsoft Robotics Studio environment include: end-to-end Robotics Development Platform, lightweight services-oriented runtime, and a scalable and extensible platform.

The Semicolon Wars

Friday, June 16th, 2006

American Scientist has published an overview of programming languages, and offers some explanation on their prodigious growth in numbers.

A catalog maintained by Bill Kinnersley of the University of Kansas lists about 2,500 programming languages. Another survey, compiled by Diarmuid Piggott, puts the total even higher, at more than 8,500. And keep in mind that whereas human languages have had millennia to evolve and diversify, all the computer languages have sprung up in just 50 years. Even by the more-conservative standards of the Kinnersley count, that means we’ve been inventing one language a week, on average, ever since Fortran.

How To Write Unmaintainable Code

Monday, May 22nd, 2006

Roedy Green has written a hilarious essay on the worst programming transgressions imaginable.

In the interests of creating employment opportunities in the Java programming field, I am passing on these tips from the masters on how to write code that is so difficult to maintain, that the people who come after you will take years to make even the simplest changes. Further, if you follow all these rules religiously, you will even guarantee yourself a lifetime of employment, since no one but you has a hope in hell of maintaining the code. Then again, if you followed all these rules religiously, even you wouldn’t be able to maintain the code!

*shudder*

Love at First Byte

Wednesday, May 17th, 2006

Stanford Magazine has a fascinating article on Donald Knuth, author of the highly respected reference The Art of Computer Programming.

Knuth was one of the first people to pronounce computer programming an art, believing that even the programs that crunch your taxes and produce your bank statements should be elegant. Like artists, he says, programmers have individual style and are propelled by intuitive leaps—Knuth knows he’s not really ready to solve a problem until he can think of it without using pencil and paper; his best ideas rise up from his subconscious while he swims. And like artists, he says, computer scientists are driven to produce. “Like a poet has to write poetry, I wake up in the morning and I have to write a computer program,” he says.

Quines and the Fixed-Point Theorem

Tuesday, April 25th, 2006

Great article on writing self-replicating programs known as quines. Douglas Hofstadter’s wonderful book–Godel, Escher, Bach: An Eternal Golden Braid–also explains quines rather well.

A “quine” (or “selfrep”) is a computer program which prints its own listing. This may sound either impossible, or trivial, or completely uninteresting, depending on your temper and your knowledge of computer science. Actually, it is possible, and there are some interesting ideas involved (in particular, writing a quine is not a hack that only works because the programming language has certain nice properties — it is a consequence of the general so-called “fixed-point” theorem, itself an instance of Cantor’s ubiquitous diagonal argument).

What’s New in Python 2.5

Wednesday, April 5th, 2006

The latest changes to Python have been posted.

To the Hexth Degree

Friday, March 24th, 2006

Alex Papadimoulis has posted a truly stunning code excerpt to The Daily WTF. It was originally from a routine used to convert a byte array to hexadecimal. I guess if your boss insists on using Lines of Code as a performance metric, this is one way to be “productive.”

You may have guessed by the title, but today’s example is from one of the more complex realms of mathematics and computer science: hexadecimal. Today’s example is actually the sixth post of its kind. David H’s former colleague now holds the “hex” prize for using no less than 5,000 lines to convert a byte array to hexadecimal, something which could normally be done with a single line of Java code …

WTF indeed.