The Global Leader in PC & Android System Health Solutions

Month: September 2007 (Page 3 of 3)

Prevent Death By Software

There are way too many bugs in software today. How many times have you seen the a screen of death? Do you like the phrase “PLEASE TELL MICROSOFT ABOUT THIS PROBLEM”? Did your Segway break your teeth? (Check out this video clip)

Software can kill you because too many of the people that build it don’t bother to build it right. Certain companies are notorious for pushing out software releases before it’s truly ready for customer use. The source code is riddled with bugs and inefficiencies that may never be corrected until they injure or kill someone. Inadequate use of software methodologies and shortcuts therein lead to annoying, expensive, and downright dangerous bugs. These are bugs that can be prevented with the proper care and feeding of source code.

Here are just a few things that help catch problems in software before it’s released. Perhaps you’ll use one to find a bug or two in your code before it goes out the door of your company. Maybe we can save some headaches, teeth, or a life.

Write code so others can read it.

This seems like common sense, but far too often source code is written in some very obscure ways. Variable, method, and class names are not descriptive. Indentation is all over the place. Not enough whitespace. The list goes on and on… Plain and simple: take care in writing your code to some agreed upon coding convention so some other sucker won’t make big mistakes.

Write and use automated tests.

Unit testing, White-Box, Clear-Box, Black-Box, X-Box (just kidding), etc. Find some you like and put them to use. The idea here is pretty simple. Write some code, submit it to source control and let some drone machine run tests on it. There are a bunch of ways to do this. My colleague Harold and I like running our tests with CruiseControl, but there are plenty to pick from.

Prevent bloat.

Don’t over-engineer your designs or your code. Solve the problem at hand in the most straight-forward and simple manner possible. Lots of code has bells and whistles that are never needed or used. Although these are creative, they can be a waste of time and introduce the possibility for more bugs. Software is an art-form and the impulse to go nuts is hard to contain at times. Control yourself (and keep an eye on others)! Write the ideas down for further discussion as they may very well be desired at some point. If not, you probably just saved lots of people lots of time.

Keep an eye towards the future.

There’s a fine balance between over-designed and extensible software. Learn to apply design patterns to keep your software limber and ready to change.

Reduce Redundancy.

In any project, the less code you have to manage, the better. Try to combine common code whenever you see it. If you find yourself making the same change in more than one place (copy/paste), you probably have a good candidate for code reduction. Some simple tips:

  • Use common locations for constants, helper functions, etc. whenever possible.
  • “Combine” class code by extending from classes that have similar functionality.
  • See if code generation can help reduce repetitive coding tasks.
  • Always take a step back to see if the problem you are trying to solve has been solved before. Leverage other people’s time in this situation by finding ways to use their solutions.

Take the medicine as per doctor prescribe you. online cialis india Quite a large number of online buy levitra pharmacies, over the past few years, emerged as great help for individuals tired of seeing sky high prices of the treatments that are not noticeably effective. Kesar levitra uk improves the blood flow, stamina and strength. Manufactured by Ajanta pharmaceuticals, Kamagra was introduced in tablet, jelly and soft tablet for in order to avoid buying from a fraudulent online pharmacy, you do not need of have a prescription and so you need not to be ashamed of while taking drug to improve your viagra ordination condition.
Know what’s going on around you.

Communicate with your fellow employees! Call, email, or simply talk to your colleagues about what you are working on. Ask as many questions as possible. You can prevent many mistakes you or others might make by bouncing ideas around and knowing what is going on around you.

Use source control.

Source control is useful not just for the obvious reason of keeping versions of code in a central location. It can also serve as a great communication tool. Monitor the code you care about however your source control software allows. Keeping tabs on what others are doing is not only a great way to learn, but also helps others follow some of these guidelines.

The more opportunity you create to catch mistakes that lead to bugs, the better. Software developers need to help each other create better software. Remember: Prevention is the best medicine.

PC-Doctor’s Robotics Lab

In August 2007’s IEEE Spectrum they had an interesting article about Microsoft’s robotics lab.

I do have some highly speculative and mildly interesting thoughts about PC-Doctor‘s role in such an industry. Before I get there, though, I want to comment on how, when Bill Gates wants to put together an “elite” team of programmers to do something that’s new for Microsoft, they take people who have been Microsoft employees from birth. After all, if they’ve learned anything outside of Redmond, they might not want to do things the Microsoft way!

Okay, that’s all the ranting I’m going to do. Other than that, they seem to be doing some cool stuff over there. Essentially, they’ve created a robotics lab who’s goal is to create some software tools that will standardize the way sensors and actuators are hooked together, and they also want to make a centralized database to hold navigation information. The goal is to make home robotics happen on a large scale.

The article says that the current market for robotics is about $11B. That’s not much from Microsoft’s point of view. However, it’s pretty easy to imagine that, if home robotics does get to the point where everyone has a few robots in their house, then it’ll be a heck of a lot bigger than that.

Okay. We’re finally past the ranting and background material. Why should a PC diagnostics company be interested in this?

A robot or two in everyone’s home is a lot of hardware to manage. Camera lenses can get dusty, bearings can start to fail, DC motors can overheat, batteries can lose power, dogs can chew the video cables, and dust bunnies can be unreachable because of obstacles. There’s a lot of diagnostic possibilities.

You sample viagra pills will see that it will increase your sex drive and energy during an intercourse. The ageing male experiences a reduction in the blood flow quantity to https://www.unica-web.com/index-german.html buy viagra online in the connecting penile tissues. Still for the introductory part, Vimax is an generic cialis cheap herbal formulation designed to increase the size of penis. cheapest cialis One hope is that green biotechnology might produce more environmentally friendly solutions than traditional industrial agriculture. From our point of view, the best part of Microsoft’s entry into the market with a bunch of Windows geeks is that they’re almost certain to want to make robotics into something like Windows. Windows is incredibly good at getting a bunch of strange hardware to work together despite the different manufacturers not even knowing about each other. Anything that a bunch of Windows programmers will create is almost certain to have similar abilities. This is critical for PC-Doctor. We wouldn’t be able to create a diagnostic for each IR camera out there. We’d have to make a single IR camera diagnostic that could work with a large fraction of IR cameras out there.

Would our diagnostics for robotics be substantially different from PC hardware diagnostics? To some extent, they wouldn’t have to be. There’s certainly a CPU and memory bank on the robot that has to work. For the purposes of a highly speculative blog post like this, let’s ignore that.

Certainly, some diagnostics could be very, very different. A fancy robot contains a variety of sensors and actuators. A Roomba, for example, has a steering servo, a drive motor, a pressure plate on the front, and a sensor on the bottom to detect stairs. This is about the minimum number of sensors you can have on a useful robot. (That’s why Roomba is successful. It’s $120.) Testing these sensors and actuators in meaningful ways might not look a lot like PC hardware.

One difference here is that, if you want to test a sensor on the floor that detects stairs, you’ll have to find some stairs. That means that the diagnostic would have to actually use the robot in order to test it. If you want to test the DVD drive on a computer, you don’t really have to worry about the graphics card. To test a stair sensor, we’d have to figure out if it’s even possible to test it. (It might be in a single floor house. It might be a Roomba and not have any useful navigation capability at all!)

Another difference is that a lot of robots have sensors that measure how well the actuators are working. For example, a motor that controls an arm joint might also have a angle sensor on that same joint. Feedback would be used to ensure that the arm is moving correctly. It’s tempting to assume that this would reduce the need for diagnostics. However, the feedback loop actually creates more opportunity for diagnostics. For example, you could keep track of the amount power required to accelerate the arm under various circumstances. If that varies over time, then something bad might be happening. If you wanted to get really complex, you could test an angle sensor by pointing the camera from another robot at the arm and moving it. That would require multiple robots and be a lot of fun to write. (Hey, Ken! Can I write that one?)

Obviously, there’s no market for this yet, and we don’t have a robotics broom closet in the back of our R&D lab. (I suppose I wouldn’t be talking about this on a blog if there was.) It is a fun topic to think about, though.

Newer posts »