JeanCarl's Adventures

2010: The year we controlled the world from our laptop

March 18, 2010 | Web 2.0

Living on the internet has never been as easy as it is today.  From socializing to growing and building stuff, you never have to leave your computer to do your chores.

While you’re on Facebook socializing and sending status updates, you can head over to Social City, a game where you build a small city with factories, homes, hotels, and community centers.  Similar to SimCity, you build and run a city with a growing population.

Once you have your residence, you should probably think about the food supply.  A grocery store?  Nah.  Build and maintain a farm in Farmville.  From strawberries to cows, most items can be added to your farm and harvested within minutes or hours.  Don’t forget to harvest, as there’s only a limited amount of time after the crop is ready for picking before it wilts and you must start over.

When you have a comfortable home, consider a friend or two to keep you company.  A dog, a cat, or a fish will keep you busy in Petville and Fishville.  After feeding your pet, there is always the chore of cleaning up.  From algae on a fish tank to stinky socks from your dog, you can count on something that needs to be done.

But beware, you should look outside for criminals.  With all the residents of the city focused on their screen, crime is very likely.  Get your friends to help you fight the bad guys in Mafia Wars.  Stealing cars and shooting the bad guys will reward you for your risk taking and fill up your bank account with gold.

If you do venture out to the new world, you can always start a cafe in Cafe World.  There are always an endless number of patrons ready to eat your delicious food.  Do remember food spoils quickly, and feeding your guests old food will only make things worse.

Since you won’t see your friends very much, send them gifts to remind them of your friendship.  A lid for a spice rack or a cow for their farm will surely keep them happy and they may return the favor.

Daylight savings time

March 16, 2010 | Offline

On Sunday, many of us adjusted our schedules and lifestyle one hour so that we can enjoy a longer day of sunlight during the summer.  While many of us don’t mind changing our clocks back one hour in the fall, moving them forward one hour in the spring means we lose an hour of sleep.

This year, I only had to adjust two of my clocks.  I don’t live in Arizona.  And I’m not an hour early to dinner either.  My cell phone, TiVo, alarm clocks, and computers all changed the time without my intervention.  The only two items, the microwave and the clock in my car, needed adjustment.

It’s very convenient not having to change all the clocks manually; especially the annoying digital clocks which make you cycle through the twenty-three hours when we fall back in the fall.  I remember back in the days when my computer had me confirm the right time the first time I turned it on after the time changed.  Now it changes automatically.  My TiVo automatically adjusts.

My cell phone uses the time from the cell network.  Unless the cell phone provider doesn’t change the clock, I should always have the correct time.  I recently converted a analog wall clock to a digital atomic clock.  No need to worry about that clock now.

One could call the human species lazy for not adjusting the clocks that we depend upon so much.  But we brought this on ourselves.  To have more sunlight, we adjust our day as the sun and Earth make their orbital dance.  If we didn’t need to know the time, when the sun rose we would too.  When the sun sets, we would retire for the night.

So as you adjust to the missing hour of sleep and the sun still being up at seven at night, remember the reason we have clocks in the first place.  If we didn’t have them, we wouldn’t have to adjust the time or even obey the clock.

Over engineering

March 13, 2010 | Programming

Over engineering a computer program or script can be a frustrating experience.   At the beginning, there are ideas of how something is going to work.  The problem is you cannot predict exactly how it will be used in the future. At the other end, it can be frustrating when the solution chosen was overengineered and a portion or all of it cannot be used. A new solution has to be thought up and all the extra effort made in the initial version for the future has to be thrown away.

For a new company with limited time and a lot to get done, it may be best to get a working product out and enhance it as needed later on. This often turns out to be faster than the over engineered method.

The “learn as you go” method adds incremental additions and changes which are easier to stomach if they are scrapped or removed from the product. This approach may seem like an inconvenience and unneccessary when you are devoted to getting something solid and that won’t require a whole rewrite in the future. Keep in mind it’s also inconvenient having to reinvent the wheel for a whole product because it doesn’t fit a new vision.

Reinventing the wheel is also a painful process. Having to rewrite a substantial amount of code to get the product to perform like the old version did but in a new fashion should be avoided if at all possible.

If you must rewrite the system, make sure that the changes are absolutely neccessary and not just a time waster in hopes of improving the core of the system. Critique the new concepts that will take more time and effort to implement and see if the value outweighs the time and effort required.

The best advice is K.I.S.S., keep it simple stupid. Complexity of a project adds to the training time for new staff, can create hard to track bugs, and a system that is difficult to maintain and enhance (which hopefully doesn’t mean completely rewriting the system).

A new type of event listener

March 11, 2010 | Programming

Keeping up in real-time with web services can be a difficult challenge. A common technique used, polling, has the consumer frequently contacting the service and asking whether there is any new data. This is acceptable if you get something new back each time. The problem comes when there isn’t anything new, and millions of consumers are asking the same question, is there anything new? As a service that may have other processes and duties to complete, these useless requests can be a big distraction or a resource hog.

Another technique is what I consider reverse polling, also known as event notification or push. Each consumer tells the service once that the service should notify the consumer when a specific event happens. For example, a new blog entry or activity stream entry. Then things are quiet. When the service performs said event, it finds all the listeners who want to be notified and sends a notification to each. This notification can vary, sometimes containing a URI to the resource or a payload containing the resource and relevant data. If there’s a link, the consumer can perform a call to the service to retrieve the relevant data.

This event notification system isn’t a new idea. Java and many other programming languages have this built in. In software, it’s useful to respond to certain events, such as a mouse click or keystroke.

Event notification can reduce the amount of bandwidth, processing, and time resources that unnecessary or aggressive polling often waste. It can also greatly improve the accuracy of real-time data retrieval, getting notified almost instantaneously instead of waiting seconds or minutes until the next scheduled poll.  As a side effect, web services don’t have to be concerned as much about metering the number of calls per consumer as a large number of requests will be eliminated with event notification.

Open source projects

March 08, 2010 | Programming

Open source projects can be an efficient way to develop applications and websites. There isn’t just one company or person responsible for the application from start to finish. Instead, many people can be involved in making decisions about the way a project progresses. This prevents an overly eager person from leading a team of developers down the wrong path. Open source projects can also attract interest in a new idea, leading to more developers and less development time overall.

Most open source projects are open (no pun intended) to anyone who know’s the language and has some experience with collaborating in a team environment. There are often a set of features that are to be developed and included in each version. It’s up to each member of the group to select or be assigned a task and participate in getting things completed. This could include the front-end user interface, the core backend, or just simple tools that help with current or future development. Optimization can also be important as a project gets larger.

Some participants of open source projects participate for their own entertainment and their only compensation is the gratification of building something with a group. Since there is no cost to add more programmers to a project, having as many as possible can help a project progress faster. The more brain power you have, the more features you can accomplish. With so many people, several versions of the product can be developed at the same time providing more frequent and faster updates down the line. Users always like to see new features in the applications they use everyday.

With all this brain power also comes experience. Some people involved may have worked on major projects and have experienced common pitfalls that can be avoided early. Others know about security issues that can come up, and can help steer the project away from them.