Tag Archive for 'Learning'

The Forces of Evil

Bad luck happens. There’s always an element of chance that you cannot control, no matter how many failsafes and backup plans you have.

A few years ago, my employer decided to move to new offices in downtown Paris. The power went out several times that week, as our new landlord ironed out the specifics of software engineers renting the space: our developement and CVS servers, and their air conditioning, used up a lot more power than the previous tenants.

For those of you unfamiliar with the software engineering world, the CVS server is the place where the source code is stored. You can live without it for a few hours, since you usually have a copy of whetever you’re working on stored on your own computer, but losing the data is the second worse thing that could happen to a software company (the first being that the entire development team gets hit by a bus).

Since the data was so critical, we had several layers of shielding to protect it. First, there was a daily backup. Second, weekly backups were kept for a year in a remote facility. Third, the data was stored on RAID drives, meaning that should one drive fail, it could be replaced without losing any data and without the users even noticing. Fourth, the RAID drives had their own backup battery power, so that they could finish writing whatever they were writing when the power went out. Fifth, there was a failsafe that prevented the drive from writing anything if the batteries were missing.

The bad news is that the failsafe did not work: the connector had been damaged during the move, and thought that batteries were present. The batteries were out of order, but the drives thought they were present, so they tried to finish writing the data, and ended up writing the correct data at the wrong location. These erroneous writes went unnoticed for a week, until people found C code showing up in Java source files. And by then, the daily backups were all corrupted. Oh, and the local copies several developers had kept were also corrupted.

We ended up using the previous weekly backup, losing several man-months in the process, and reapplying any modifications left on our computers.

Of course, we chose to move at a time where no critical deadlines were looming precisely because we were afraid something went wrong, so we could afford losing those man-months. We could reduce the impact of bad luck, but we couldn’t prevent it altogether.

Related Posts

Suicide Bomber Training Camp

When you’re doing something, there’s this nice equation that can help you determine whether you’ll be successful:

Chances of Failure = Forces of Evil – (Brains + Experience)

The Forces of Evil are constantly working towards your untimely demise. For instance, suppose you have an important meeting with your investors. Having spaghetti for lunch is a good way to get tomato sauce on your clean white shirt. You can predict this if you’re smart (brains), or you can know this because it’s already happened (experience).

The Italian Forces of Evil

The Italian Forces of Evil

Predicting potential issues is great. You get to avoid problems you have never encountered.

But there’s a limit to how many things you can predict, especially in a short amount of time. Geniuses who can predict everything and plan accordingly are the stuff of legends and fiction. By contrast, learning from experience is far more efficient: all you need is a good memory.

Besides, having experienced a problem first-hand lets you recognize a solution when you see it used by someone else. Have you ever noticed how hard it is to convince non-technical people of the benefits of source control when they’ve never had their documents overwritten by someone else?

While useful, learning from the mistakes of others is less efficient. You don’t have the searing, vivid memories of your own failure to drive the lesson home, and you don’t have a detailed recollection of all the little things that went wrong.

Sure, sometimes it’s hard to learn from your personal experience, especially when once-in-a-lifetime situations. The cost of trying again has a huge impact on how experienced you can become.

At one end of the spectrum, we have suicide bombers. They never get a second chance. At the other end, we have modern computer programmers. They can fail as many times as necessary, because it only takes an edit-rebuild-run cycle to try again. And the ideal place to be is…

…in the middle. Because there won’t be any searing, vivid memories of your failure if it can be overcome within three seconds.

All of you here have one hundred thousand bad drawings silly mistakes in you. The sooner you get rid of them, the better it will be for everyone.

Anonymous art institute instructor, quoted by Chuck Jones, adapted by me

Related Posts

Seven Steps for Fast Learning

Learning an entirely new concept does not happen overnight. On the other hand, there are ways you can follow to make it happen faster or avoid reaching a dead end. Here are seven simple, three-word steps you can follow:

1. Find someone knowledgeable. By this, I mean a real person that you can meet face-to-face or on the phone, not some random person on the internet or, worse, a manual. Then, ask them to talk about the topic. If you found someone who is passionate, they’ll throw a flurry of sentences at you that are probably way too complex for you to understand. Grasp what you can, ask questions if it helps, and don’t be afraid to come back later if you have more questions or need written references.

2. Write everything down. If you’re not familiar with a topic, you are bound to forget everything you hear or read. By writing things down, you are doing a second pass on your short-term, which helps you commit that to a longer term. And besides, you’ll have it in writing for future reference. Mind maps do help: they don’t contain a lot of details, but their graphical nature helps bring back detailed memories.

3. Unravel the threads. Any domain is like a web of related concepts. You ultimately need to understand all the major concepts and relationships, and you will learn a lot of minor details along the way. So, follow the links as often as you can: every word you hear, every concept you discover should be written down so that it can be explored later on. This is a good time to start looking for manuals: Wikipedia can do a fine job explaining the general idea, but you usually need more practical textbooks or courses for the finer details.

4. Never stop exploring. It can be tempting to decide that you understand a given concept. In fact, we do it all the time because we simply don’t have time to become an expert at anything. Think you know what a backorder is? There are probably many concepts you have never heard about, or never thought were relevant, that may completely change how you look at backorders if you take the time to examine them closely. Every new concept we discover can change the way we look at things we took for granted.

5. Try explaining it. Find an audience that is unfamiliar with the topic and make yourself understood. Participate in online forums and discussions on the subject (you might want to do it anonymously at first). Thinking of an explanation or practical application for your theoretical knowledge will highlight any grey areas you might overlook. Confronting human intelligences with your ideas follows the nothing ever goes according to plan theory, which forces you to look at the subject in a different light in order to communicate.

6. Sleep on it. When you keep a lot of concepts in short-term memory, it’s easy to forget what is right, what is wrong, and what is an outdated assumption. Flushing things out of your brain by sleeping or doing something else for a while will keep only whatever ended up in your long term memory. Then, you can go back and fill the holes through more thinking or reading, thus eliminating any inconsistencies as you find them.

7. Practice, practice, practice. No amount of reading or thinking about a topic will make you into an expert. The devil is in the details, and most teachers or resources take those details for granted… or left as an exercise to the reader. Do your homework: you can learn what? from books, but how? is something taught only by experience and why? is for you to meditate on.

How often do you get paradigm-shifted by a new discovery that changes everything you thought you knew about something? This once happened to me very often, but the frequency is starting to decrease. I must be getting close to knowing everything :)

Related Posts

Brain Dump

Programmer Fonts. We programmers love fonts that are fixed-width, clean and readable even with a small font size. My personal favorite is Proggy Tiny, a free programming font. Do you have your own favorite, or do you use whatever the system default is?

Stop Micromanagement. Take any game where you play as the here and have to accomplish something. Now, turn it into a game where you control the world to help the computer-controller hero accomplish the same thing. This is the difference between doing it yourself and micro-managing someone to do it.

Programming Games. On the topic of having games teach interesting concepts, the second installment of LightBot is now available on Armor Games ; the game teaches recursion, recursion-based loops, and conditionals.

Google Street Smarts. It’s fairly easy for us to search online for our own names, to see what others might find. How many of you have tried to search for pictures on geographical locations based on their names? And how can we know if we’re not on Google Street View, anyway?

New Favicon. There’s a new favicon on the blog. You should see it in the address or tab bars above, or here:

Copy-Paste Your Insight

I do improvisational theater. I’ve been doing it at an amateur level for three years now. My favourite exercise is to stand on stage, in front of an audience, and be given a word or sentence. Then, I have to spontaneously tell or act some kind of story revolving around that word or sentence, lasting exactly thirty seconds.

Like, someone says Asparagus and I’ll act a scene where I put on some boots, gloves and a radiation suit, open a fridge and complain about my spouse’s cooking.

119369226_596ada02e8

Of course, when you have to do something like this, you simply cannot plan in advance everything you are going to do before you start. In fact, you can’t even plan how it is going to end. You just don’t have time to think in that split second between the moment you hear the word and the moment you start acting. You have to start acting right away. So, choose an action and do it. Anything. You hear Asparagus and you start tying your shoes slowly because you just feel like it. This leaves you a few seconds to think about who your character is, and why he is taking that specific action.

Once you have a good character in mind, it’s easier to act in character, even without a clear objective. This leaves you with some time to choose that objective and decide how the act will end. You will spend about fifteen seconds looking for an idea, so you just have to have a character or you’ll be naked.

There are good characters and bad characters. A bad character is a noun. A policeman. A chef. An extraterrestrial. A lightbulb. A good character is a noun and an adjective. An allergic policeman. A sexy chef. A tax-evading extraterrestrial. An imaginary lightbulb. The adjective adds depth to the character : that’s where great acting and great ideas come from. In fact, the further apart you choose your noun and adjective, the greater the potential. A policeman whose defining characteristic is allergies is a lot more unusual than a policeman whose defining characteristic is strength.

This also works outside of improvisational theater. It is by combining ideas from different areas of life, in ways that seem completely crazy, that entire philosophies and ways of understanding emerge.

Applying insight you get from a certain area to another will improve your knowledge and understanding of the latter.

On the other hand, we’ve been incessantly told that analogies are a bad idea. Smart, credible people have determined that you need ten thousand hours to become an expert at anything. Movies show that you can’t just copy-paste your expertise as a fisherman to be a loving and caring father. An expert baseball coach, no matter how experienced, will never be able to understand nuclear physics by applying his baseball expertise.

The natural reaction of anyone is to take their experience from whatever area they are an expert in, and use it to improve their skill in a new area they are beginning to discover. This never works. You just end up with baseball loonies explaining quantum mechanics in terms of batting averages.

By definition, when applying your experience to an area you are unfamiliar with, you cannot tell if what you are doing is right or wrong.

On the other hand, learning about baseball might just give a quantum scientist that little nudge in the right direction to form a new theory or solve a difficult problem. The history of science is filled with epiphanies that came from completely unexpected directions.

So, stop thinking about your job all the time. Do something new, like baseball or fishing or improvisational theater or knitting or reading yaoi fanfics. And every time you see something new, ask yourself what it teaches about your own craft. When everyone around you does a good job, be the one who does an allergic job.

Related Posts

Fast Learners

Slow learners need weeks of training and years of practice to become skilled in their area of expertise. Fast learners «get it» within days, and become fully operational within weeks. Intelligence is certainly a factor, but it does not matter as much as one would expect.

How fast is a given person going to relate new concepts to her experience? Is she going to sift through all the feedback she gets, positive or negative, for lessons or ideas? Faced with new responsibilities, is she going to try something, anything at all, or freeze in fear because of the possible consequences? Does she think about the issue at all between 6pm and 9am? Is she going to repeat the same mistakes twice? Does she think everything is fine when everything is not fine?

But being a fast learner is a skill that is hard to demonstrate. You can demonstrate great skill with a programming language by single-handedly writing an open source program, you can demonstrate great leadership or management skills by successfully leading several teams and managing several projects, and you can demonstrate great artistic skills with a well-stocked portfolio, because these skills work on the basis of «if you did it ten times, you can do it eleven times»

By definition, you cannot learn the same thing ten times in a row, and saying that you will learn how to manage a team in two weeks because you learned how to code in PHP in two weeks is a bit of a stretch. It’s very hard to determine in a single job interview how fast someone can learn about new subjects. Once you hire someone and get the chance to work with them for a short while, though, you should be able determine this.

Otherwise, there’s no telling where that person will be a few months from now. And that would be bad management.

Information Flow

The real world is a complex place. When writing software that has to interact with the real world, there are literally thousands of concepts you have to master and tens of thousands of details you have to be aware of, or you will paint yourself into a corner where your software clashes with reality. And reality always wins.

Understanding concepts and details is a fundamental part of a project’s time budget, whether they come from the project requirements, real-world constraints, third party code or teammates. Every time information goes around in a project, it uses up valuable time, and to keep the time budget tight it becomes necessary to decide what information should be allowed to go around, and where.

Working on concurrent systems is an enlightening experience, because of the many similarities between an array of computers and a team of information workers. Computers arrays have latency issues when one thread depends on another thread to be done…

“When do you think your settings import module will be done? I’m stuck on the payment API until I can load those settings!„

…they have bandwidth issues and manipulating some data yourself is usually faster than sending the data to another part of the cluster for treatment…

“The User object? Well, it’s a bit of a weird design, but it’s rather clever. I’ll draw you a quick UML sketch on the blackboard so you can see what the five helper classes do.„

…they have to avoid data loss if a computer or network is down…

“I have no idea how this stored procedure works, you should ask Tim, he’s the one who wrote it. He’s in southern France right now but I think he’ll be back next month.„

… and they have to handle a directory of parts and a garbage collector for data…

“Wait, nobody’s written the comment moderation back-office! Who was in charge of doing it? Who wrote the comments front-end anyway?„

There are algorithms, strategies and techniques for handling and optimizing those things. Many of these can be adapted to humans, with the added benefit that, humans being smart, they can understand the point of those algorithms and compensate for minor flaws if the plan isn’t perfect.

HADOPI

The HADOPI law was recently adopted by the French parliament. I have an issue with this law: it deals with technical things that few people are knowledgeable in (including most members of parliament) such as the Internet Protocol and the use of IP addresses.

So, I have made a small effort on this website to explain the basic technical principles underlying the HADOPI law [fr].

Inline Help

Your average user does not know what a trackback is. Yet, Wordpress must let experienced users ping trackbacks. How to include trackback information without scaring away the inexperienced users (and possibly even educating them along the way)?

The solution chosen by Wordpress is to use slightly more verbosity to describe what trackbacks are:

wordpress-back

By contrast, Magento involves a lot more knowledge than just publishing a blog. While it’s possible to assume that Magento users earn their wages by knowing how to use it, most of the time they only manipulate the system as a side-effect of handling sales in their brick-and-mortar company, or they are new to sales altogether. So, the result is a complex product with outright terse field descriptions that have very complex effects:

magento-backWho, among normal Magento users, knows what a meta keyword or meta description is? Or whether meta keywords are as useful now as they were in the good old days? But that’s not very important, since you could just ignore those fields.

What’s an URL key? Now, even an experienced web developer might have trouble with this one (it’s the equivalent of a Wordpress slug, except Wordpress displays that “URL key” field as a more easily understood “Permalink: http://www.nicollet.net/2009/05/inline-help/” with the last URL segment editable).

What about the Page Title? What’s the difference between the category name and the page title? Which is displayed where?

Things get even more complex with other areas of Magento. For instance, in a lot of places a given field is disabled and a “Use Config Defaults” checkbox next to it is checked. The problem is that there is no indication about where those configuration defaults can be changed.

Last but not least, there are several classic questions to be asked, such as “Why does this product appear as out-of-stock?” or “Why doesn’t this product appear in this category?” or “How do I set a table rate?” which require careful analysis of the dozen options that might affect the actual state of the item (enabled? present in website? present in category? stock greater that zero? set as in-stock? children items enabled, present in website and set as in-stock? …)

Inline help items

Modern Javascript libraries allow altering an existing page in a non-intrusive manner by decorating the page elements once they are loaded (or when the user asks for help). This means it’s possible to add novice-specific inline help as:

  • Short text snippets under complex or technical items to explain what they are, possibly with a link to the complete explanation.
  • Explanatory tooltips on hovering.
  • See-also links (where do I change this configuration default? where do I set table rates?) placed exactly where the user might be wondering something.
  • Move-along tutorials that detect whether data was entered in certain fields and guide the user to create items, add them to categories, and so on…
  • Troubleshooting checklists (with links) to determine why a product does not appear, or why it appears out of stock.

In fact, it would even be possible for IT companies to provide their customers with customized help messages that match their specific internal processes.

JITBrain

Some of you may have wondered, what is this secret project he is working on?

The project is called JITBrain. In itself, it’s nothing quite groundbreaking, merely an issue tracking platform that services two categories of users:

  • Individuals that have a lot to do but never seem to manage it. These are helped by features such as extremely simple todo-list manipulation, a search engine for looking at previous tasks and retrieving important information, and helpful statistics.
  • Teams that must collaborate on projects. These are helped by features such as issue tracking, simple workflows, attached links and files, planning poker, reporting charts, and motivational gizmos.

The unusual thing about the project is the development method: it builds upon my earlier ramblings on snippet-oriented development (developing quality software by actively thinking of the people who will read and reuse the code) to actually become an advanced tutorial in itself. This brings yet another benefit, since the code is not only designed in short bursts of concisely explained functionality, but a complete documentation and log is being written along with it.

As such, it has the additional purpose of serving as a simple reference for “classic mistakes” both in technical and functional areas in the development of a website.

The tutorial advances along with the development of the system, which means you can see the tutorial or look at the website.



693 feed subscribers
(readers who polled a feed this week)