Feel like a geek and get yourself Ema Personal Wiki for Android and Windows

13 April 2010

Joel on Software - a summary: 2003

This is a summary for the blog by Joel Spolsky, Joel on Software, volume 2003. The summary for the years 2000-2010 can be found on the Joel on Software summary index page.



Local optimizations can harm your business as a whole. -- Blog post on 2003/01/15

The Apple strategy is not to talk about future versions of their products. Advantages: 1) you will be guaranteed at least half a year without competition. 2) Avoid disappointed expectations. 3) flexibility that you need later when Murphy strikes. 4) It is a simple policy. -- Mouth Wide Shut.

An attractive community site is easy to understand and work with, and discourages fuss. Small software implementation details result in big differences in the way the community develops, behaves, and feels. -- Building Communities with Software

VCs do not have goals that are aligned with the goals of the company founders. Company founders would prefer reasonable success with high probability, while VCs are looking for fantastic hit-it-out-of-the-ballpark success with low probability. -- Fixing Venture Capital.

The way to stand out when applying for a job is to write a letter that reflects your unique personality and highlights the reasons why you want to work at the place to which you are applying. -- Blog post 2003/06/15.

No software company can succeed unless there is a programmer at the helm. -- Rick Chapman is In Search of Stupidity.

Unicode maps characters to codes. The encoding defines the way the sequence of codes that represent characters are stored. You have to know what encoding a string is to display it correctly. -- The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)

The most important factor in software work is not the tools and techniques used by the programmers, but rather the quality of the programmers themselves. -- random qoute from Blog post 2003/11/14

When software is built by a true craftsman, more effort went into getting rare cases exactly right than getting the main code working, even if it took an extra 500% effort to handle 1% of the cases. This delights users and provides longstanding competitive advantage. -- Craftsmanship.

Unix culture values code which is useful to other programmers, while Windows culture values code which is useful to non-programmers. -- Biculturalism

09 April 2010

i18n-proof c# regex recognizing uppercase and lowercase letters

Finding WikiWords with patterns like [A-Z][a-z][...] won't do: the recognition of uppercase and lowercase letters is not i18n-proof.
The following Regex finds WikiWords in an i18n-proof way:
private static Regex _wikiWords = new Regex(@"
    \b       #start on a word bounday
    \p{Lu}   #start with uppercase letter
    \p{Ll}*  #zero or more lowercase letters 
    \p{Lu}   #one uppercase letter 
    \w*      #and zero or more arbitrary characters 
    |                 #or
    \p{L}+\d\w*       #a mix of letters and digits
    |                 #or
    \d+\p{L}\w*       #a mix of digits and letters
", RegexOptions.IgnorePatternWhitespace);
Speaking of i18n. The term i18n is flawed. I am from the Netherlands. If i want to support my own language, and no other language, no international boundary is crossed. But I still need a i18n-proof WikiWord engine.

07 April 2010

Joel on Software - a summary: 2002.

This is a summary for the blog by Joel Spolsky, Joel on Software, volume 2002. The summary for the years 2000-2010 can be found on the Joel on Software summary index page.


Maybe this is the key to productivity: just getting started. Move forward every day. You may accomplish only small changes, but sooner or later you will win. -- Fire And Motion

When you're showing off, the only thing that matters is the screen shot. Build your (demo) UI in such a way that unfinished parts look unfinished. -- The Iceberg Secret, Revealed

Three minutes of design work can save hours of coding because Nothing is as Simple as it Seems

If you have a small number of customers, prefer frequent small releases to minimize time between user request and releasing the code. If you have (or want) a large number of paying customers, prefer less frequent releases to avoid a bad impression. For Systems With Millions of Customers and Millions of Integration Points, Prefer Rare Releases, mainly because of compatibility issues. -- Picking a Ship Date

Pick a programming language pragmatically, suitable for the job. Don't base your choice on syntax. -- Blog post 2002/05/05

There are different "worlds" of software. When somebody tells you about methodology, think about how it applies to the work you're doing. -- Five Worlds

Smart companies try to commoditize their products' complements to increase the price of their products. -- Strategy Letter V

The success of a platform is directly proportional to its ability to attract developers. -- Platforms.

Entering a bugreport in your bugtracking software should be as easy as possible, otherwise people will avoid using it. -- Blog post 2002/09/12

A good installer will roll back all changes when it fails. -- Blog post 2002/10/08.

Never listen to your customers. They were dumb enough to buy your products, so they have no credibility. -- oops, that was a Dogbert quote.

Leaky abstractions are abstractions where the underlying concept sometimes leaks through. The only way to deal with the resulting problems is to learn about the underlying concept. So the abstractions save us time working, but they don't save us time learning. -- The Law of Leaky Abstractions.

There are a lot of programming worlds, each of which requires a tremendous amount of knowledge for real proficiency. If you have a choice of platforms, use the one your team has the most skills with, even if it's not the trendiest or nominally the most productive. -- Lord Palmerston on Programming.

30 March 2010

Joel on Software - a summary: 2001.

This is a summary for the blog by Joel Spolsky, Joel on Software, volume 2001. The summary for the years 2000-2010 can be found on the Joel on Software summary index page.


Don't grow faster than you can find talented people. Some things need talent to do really well, but talent is hard to scale. Having the talent create rules for the untalented ("The Methodology") results in very low quality. -- Big Macs vs. The Naked Chef

Everything you ship to customers should be produced by the daily build process. -- Daily Builds Are Your Friend.

Never let people work on more than one thing at once. Programming is the kind of task where you have to keep a lot of things in your head at once. Therefore task switches take a really, really, really long time. -- Human Task Switches Considered Harmful

A company with a personal voice is attractive, because we are humans. -- Spring in Cambridge.

It makes no sense to optimize software by reducing the size of it, since storage is cheap, but programmer's aren't. -- Strategy Letter IV: Bloatware and the 80/20 Myth.

Architecture Astronauts add so many levels of abstraction that the resulting ideas are completely useless and incomprehensible. They throw bombastic whitepapers at problems that don't need to be solved. -- Don't Let Architecture Astronauts Scare You
If you want something to be The Next Great Thing it has to be more than architecture, it has to enable things that people really need. -- Are the Groove Designers Architecture Astronauts?

If your business plan includes projections from IT research firms, you better start planting tomatoes. -- Blogpost on 2001/04/18

Eating your own dog food can be disgusting, but that is precisely why you have to do it. -- What is the Work of Dogs in this Country?

If Microsoft were to concede the slightest point in an anti-trust case, hundreds of independent software companies would see this as their opportunity to enter Microsoft's markets. -- Michael E. Porter's Competitive Strategy
(Actually the point this article is trying to make is "you should analyze your competition and try to guess how they will react to your move", but I found the former sentence somewhat more appealing.)

Good software, like wine, takes time: probably ten years to become really good. Take this into account in your business model. -- Good Software Takes Ten Years. Get Used To it.

Fixing bugs is only important when the value of having the bug fixed exceeds the cost of the fixing it. The advantages of fixing a bug are: better reputation, less time wasted with tech support, you might charge more for the product. -- Hard-assed Bug Fixin'

If it's a core business function - do it yourself, no matter what. -- In Defense of Not-Invented-Here Syndrome.

VB is not cool because your code doesn't have {'s and }'s. I can live with the shame if it means I'm more productive. -- Working on CityDesk, Part Three

Nowadays a good programmer spends a lot of time doing defensive coding, working around other people's bugs. -- Working on CityDesk, Part Four

Joel points the reader to "Guidelines on Writing a Philosophy paper" by Jim Pryor. This article has some important points on writing, such as:
Don't write using prose you wouldn't use in conversation. Make the structure of your article obvious. Pretend that your reader is lazy, stupid, and mean.

Be pragmatic in your choices and don't necessarily follow the lastest hype. -- Working on CityDesk, Part Five

The stricter the API is about its input, the more likely the code is going to work in funny situations. -- A Hard Drill Makes an Easy Battle

Modern programming languages might give the impression that you don't need to understand the underlying concepts anymore. But this is not true. Some of the biggest mistakes people make even at the highest architectural levels come from having a weak or broken understanding of a few simple things at the very lowest levels. -- Back to Basics.

If you're not in a position to force changes to the development process, you still can initiate improvements. 1. Just do it yourself. 2. Find the people who are willing to improve and capable of it, and get them on your side. 3. Let bad programmers solve their own problems, this will occupy them for months and prevent further damage. 4. Get Away From Interruptions. 5. Keep doing your normal work to avoid bad reputation. -- Getting Things Done When You're Only a Grunt.

NHibernate: SQL query error

A unittest failed with this exception from the MSSQL CE provider:
System.Data.SqlServerCe.SqlCeException: There was an error parsing the query. 
[ Token line number = 1,Token line offset = 34,Token in error = ) ].
The SQL statements are generated by NHibernate, so this was a litte bit confusing. 

Fortunately, there is logging. And an excellent viewer.

The generated SQL statement does not contain any values to INSERT. This is logically correct, because the entity class does not contain persistent properties itself: it only contains two mapped collections:
public class HL7v3InfoMap : ClassMap<HL7v3Info>
{
    public HL7v3InfoMap()
    {
        Id(x => x.Id);

        HasManyToMany(x => x.FunctioneleEenheden)
            .Access.CamelCaseField()
            .Cascade.All();

        HasManyToMany(x => x.DataTypen)
            .Access.CamelCaseField()
            .Cascade.All();
    }
}
In this case the mapping was not finished yet, so the problem solved itself when I added more properties. But I also have cases where the class does not have any persistent properties of itself, for example a class that is an abstract base class.

I don't know a better solution than adding a dummy property to the entity.