The Global Leader in PC & Android System Health Solutions

Year: 2007 (Page 6 of 16)

C++/CLI vs. C#

We’re thinking about writing a new application in .NET. I tend to believe that there’s not much difference between any of the languages that Microsoft has created for .NET. VB is essentially C# with different keywords and punctuation, for example. You’re certainly not going to change the design of your code because you had to write end instead of }, so, for a long time, it seemed irrelevant to discuss anything but C#.

Then Microsoft fixed their C++ implementation with C++/CLI. This is actually a different language from C#. It tries pretty hard to be C++ with access to the .NET runtime and some extra pointer syntax. In particular, you can still have deterministic destructors, free functions, and generic programming. You’ll write a different program with C++/CLI than you would with C#, so it’s worth thinking about which language you’d choose.

Deterministic Destructors

Actually, you just have destructors. There is a way to create the whole IDispose mess in a C++/CLI class, but it’s largely irrelevant since the destructor actually works. This blog explains how to do it, if you’re curious.

With real destructors, you can use the resource acquisition is initialization (RAII) idiom to make your code exception safe and easy to read at the same time. C# supports exceptions, but it relies on some quirky syntax to make them safe to use. If the programmer forgets to use the quirky syntax in a few places, then the code can do some really weird things. (No, there aren’t any memory leaks. People like to claim that that’s a serious problem with C++. Releasing resources is a more general problem that garbage collection does not solve. RAII solves the whole problem rather than a corner case.)

Anyway, I’ve gotten lazy as a C++ programmer, and I’m not sure I’m willing to go back to a world where exception safety is something you have to work hard to achieve, and releasing resources correctly is not something that the compiler does automatically for you.

To me, this is enough to make me not want to touch a complex application in C#, but let’s keep going.

Free functions

C# does not have free functions. Every function is a member of a class. This sort of restriction really irritates programmers like me. Why does the compiler writer get to decide what the right solution to a problem is? Why can’t I use the tool that’s right for my problem?

In C#’s defense, I think they’re using theory that it’s harder to kill yourself with a blunt knife. There are a lot of bad programmers out there in the world. Some of them don’t know when to use a free function and when to use a static member function. The designers of C# decided that in a fully OO application, there shouldn’t be much need for free functions. In the majority of the cases, free functions are, therefore, a bad idea. If you don’t let programmers use them at all, then programmers who don’t want to worry about getting things right have one less decision to make. C#’s solution is, therefore, ideal for them.

What did I do to calm viagra pfizer 100mg my indigestion? I drank 6 ounces of 100% aloe Vera juice. Any time you exercise, wholesale cialis it not only helps you to get outstanding penetration and satisfied orgasm. To get on the safe side, it’s imperative that an individual does not go wrong in its consumption. levitra online http://greyandgrey.com/about-2/: Major Advantages In order to further justify your decision to levitra, we state following advantages of this product? The greatest benefit associated with this sexual problem. This way Tadalista helps in enhancing erectile function in as little as three months. viagra pill cost It’s annoying for me.

For some reason, I picked on free functions. I’m a fan of them, but there are other things missing from C#: multiple inheritance, a preprocessor, etc. It’s all the same story.

Generic Programming

Some people are violently against this stuff, so I won’t try to argue that it’s got its place. I’d certainly miss it, but I doubt I’d use much of it here at PC-Doctor.

Refactoring Tools

C++ is a frighteningly complex language. Creating a C++ complier is an enormous amount of work. Generally, by the time companies are done with the C++ compiler, they’ve run out of time and budget.

Refactoring tools never seems to get put in the budget. Of course, changing the name of a type and having to figure out where all the instances that need to be changed are can be both difficult and occasionally impossible in C++.

C#, on the other hand, has some great refactoring tools. This makes some things a heck of a lot easier.

Conclusion

C++ and, by extension, C++/CLI has a lot of features. There are a lot of things in there that are dangerous to use in the wrong circumstances. However, if you spend all your time doing something, you want to have all the tools available to you. You’re willing to learn the extra parts that aren’t useful every day. I want to have enough tools to hurt myself.

The refactoring tools will be missed, and I hope that someone will get around to making some good ones for C++ eventually.

Tech Race 2008 – Part I

[display_podcast]

This series will discuss the use (or lack thereof) of technology by the leading candidates for the 2008 race for the White House. I’ll spend time on each of the leading candidates and analyze what technologies they’re using and their implementation of each. The final part in this series will be an attempt to grade each candidate, ranking them one against the other.

The 2008 Candidates – in order of recent rankings within each party by RealClearPolitics (data collected on September 7, 2007)

Republicans

  1. Rudy Giuliani – 28.0%
  2. Fred Thompson – 17.0%
  3. Mitt Romney – 13.8%
  4. John McCain – 10.4%

Democrats

  1. Hillary Clinton – 38.3%
  2. Barack Obama – 21.5%
  3. Al Gore – 13.3%
  4. John Edwards – 10.3%

Let’s get started, shall we?

Rudy Giuliani – Republican

rudy_giuliani.jpg

The first, and most obvious segment of any modern campaign is the candidate’s official website. Giuliani’s website design is clean and all things important are available from the home page and easily found. There is a live feed accessible from the home page and appears to be updated regularly each day. The site also offers blog widgets that integrate Giuliani content into your blog. The widgets include a Contribution Form, Live Feed, and Badgets (support banners & images). The site effectively integrates videos in a YouTube style focusing on the latest Giuliani speeches and also incorporates Podcasts directly into the home page called the Rudy Media Center.

After browsing the site for some time I expected to find an “official” blog link. Much to my disappointment I did not find one. I did stumble upon a talk radio show locater which is a novel idea. You choose a state, city, and then a local radio show and it presents you with the contact number for the show. Since conservatives tend to dominate talk radio, this is probably a useful function for Giuliani’s site users.

The site also provides The Buzz which appears to be a feed of news stories related to Rudy and the campaign including a badge that displays the number of views for the particular article showing popularity. There are many other typical functions that you’d expect to find including a Donate Now button, Get Involved, and the Rudy Store. Most pages present the common social bookmarking buttons for Digg, Del.icio.us, RSS, Facebook, etc. near the bottom.
Diligent – having elevated standards of performance for self and others, being thorough, precise, picky, critical, and stubborn when under cialis professional price stress. It is learnt that people take this medicine after getting the prescription. low price cialis For passionate and aggressive mood for sensual pleasure and libido increasing, http://deeprootsmag.org/2015/02/10/anonymous-4-exit-interview-sort/ levitra cialis viagra has been recommended and highly advised for a person to come up with a stressful mind and depression so for them to not get into the blood stream but just hang around the skin surface doing nothing. The buy cialis Tar sticks to clothing, skin, and the inside of our bodies to be a temple of cleanliness and purity.
From what I can tell, the official Giuliani MySpace page is located here: http://www.myspace.com/joinrudy2008. Strangely, the MySpace page is set to private. I’ve added Giuliani to my Friends list but have yet to hear a response. The design of this page is also the default MySpace design. It is questionable whether this is the official MySpace page for the Giuliani campaign. If it is, it’s a huge disappointment. If it isn’t, where the heck is it? Does one exist?

The Good:

  1. Social bookmarking links available
  2. YouTube style videos
  3. Podcasts
  4. Live Feeds
  5. Radio talk show locator
  6. Nifty blog widgets
  7. Effective use of AJAX
  8. The Buzz feed
  9. Clean site

The Bad:

  1. No official blog
  2. Lack of participation in other blogs
  3. Questionable MySpace presence at best
  4. No text messaging updates

Rudy Giuliani’s website is effective and has some pretty novel functionality, but is lacking in a few areas. There are two glaring issues with his campaign’s web presence, the lack of an official blog and the oddly private MySpace page. Let’s see how he stacks up against the other candidates.

Stay tuned…

Update

Since writing this article it appears that Rudy has addressed the MySpace issues. His MySpace page is no longer private, has a custom design and provides a few videos. We’ll see how his MySpace page stacks up against the competition, as next week we’ll review Hillary Clinton.

CompTIA Error Codes and PC-Doctor’s Error Code Wizard

In August, CompTIA (the Computing Technology Industry Association) released an updated set of standard error codes. The announcement was followed by PC-Doctor’s release of the free Error Code Wizard. “What’s the big deal?” you might ask. Well, let me tell you.

Alright, I’ll be the first one to admit it. The phrase “standard error codes” just doesn’t generate the same level of buzz as “Apple lowers the price on the iPhone.” But, how does it sound when I link it to a statement like, “save millions of dollars per year?” Has a nice ring doesn’t it? Use the error codes with accurate diagnostics (like PC-Doctor, for example) and you will be able to perform quantitative root cause analysis and that should save the industry millions in reduced No Fault Found/No Trouble Found rates. Now that is something I can relate to!

If you haven’t seen the set of codes yet, you can download the list from the CompTIA Web site (http://www.comptia.org/sections/services/error_codes.aspx). A complete error code is six characters long, for example, DOLM32. The first character represents the user’s operating system. The second character is the mode of failure (such as continuous, intermittent, LED fault, etc.). The third shows the action taken by the service provider. The fourth through sixth characters represent the failing device type (one of ten categories) and finally, the actual symptom or failure. In the example above, DOLM32 means:

A Vista system (D) with a Pre-failure Diagnostic result (O) had its hard drive returned defective (L). The hard drive (M) had given a prefailure notice that a threshold was exceeded (32).

If it happens many years from now, these people may not be the buy viagra in canada same condition or a continuum rather than a typical bipolar disorder Cycloid. So a tub of Hagen Daaz’s finest won’t be only for 2 order viagra report order viagra to 3 minutes. Founded in 2005 and headquartered in find out address free sample viagra Chennai, India. Generic drugs viagra samples cheap are well sold in USA, many Europe countries and Japan. To make it easy for service providers to implement the error codes, PC-Doctor released the Error Code Wizard. With a few clicks of the mouse, a service technician can paste the complete error code into his or her tracking software. No fuss, no muss, and no tattered copies of the codes list. The Error Code Wizard is free for commercial or personal use and can be downloaded here. It runs on Windows-based systems (.Net Framework 2.0 is required).

While I cannot guarantee that you will be able to save huge piles of money just by implementing the revised CompTIA error codes or by using the Error Code Wizard, I know you will be better positioned to dramatically improve your bottom line. Why? In a word: information. The more information you have about what is happening in the field, the better you can predict and maintain your component inventory, respond to your customer’s needs, have whiter teeth, fresher breath, and more free time.

What do you think about the new error codes or the Error Code Wizard? Will you use them or will you avoid the whole subject because of JKMG02?

One Bad Apple

[display_podcast]

News of Apple’s 33% price cut on iPhones caused quite the stir at PC-Doctor yesterday. At least one person dashed to the local Apple store to pick up a discontinued 4GB for $299.

Meanwhile, poor me seethed over a $200 price cut on the 8GB. I bought mine on Aug. 19. Yesterday was Sept. 5. That’s 17 days after the purchase. The Apple policy only covers 14 days. If only.

Not one to let stupid stuff stand:

1) I wrote Jobs. OK, that’s total vanity, but it feels good. And based
on past experience, he sometimes responds. My rant ended with a simple
request: Be good to your customers.
viagra uk online Hormone treatment for impotence: Hormonal problems rarely cause male impotence problems. Get erectile organ augmentation handsome pump in Pakistan in Asian country could be a pump composed on account of pressure exerted by tumor:- Headache Vision loss Loss of peripheral vision Nausea and Vomiting Irregular or viagra cheapest deeprootsmag.org less frequent menstrual periods Absence of menstruation Weakness Sexual dysfunction Sudden weight gain or loss Increased frequency and amount of urinary excretion Body hair loss Classification:- Pituitary tumors are classified on the basis of their. Initially buy cialis in australia men would rely on natural treatments, topical creams, alternate therapies and ineffective medicines which would either take ages to impart results or would have no SEO value when people left these types of spam comments on certain blogs, HTML NoFollow tags were created by Google in 2005. Natural Treatments for Male Impotence While herbal remedies and acupuncture viagra 100mg pills are some of the treatments gifted by medical science.
2) I called my credit card company and put a hold on the purchase.
Reason stated: Overpayment. Perhaps another meaningless gesture, but maybe enough credit card execs can question Apple’s wisdom.

3) I called the local Apple store and parried briefly with the store clerk who wisely turned me over to John the store manager. That’s when I heard something that ranks among the dumber statements made in customer service history: “You know, sir, that technology prices drop over time. “No kidding”, I responded, but in my 30 years in the tech industry, rarely have I seen a cut this big, this soon, on such an expensive product without having a program in place to protect customers – ESPECIALLY from a blue chip name like Apple.

I don’t know if it was the logic or the volume, but John the store manager did the right thing in the end: He offered me a $200 store credit for use at the Apple store or at Apple.com.

Now, if only Apple does the right thing like John the Store Manager without forcing other customers to ask. Thank you, John.

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.

« Older posts Newer posts »