Joe Enos
.NET Developer
Phoenix, AZ
http://www.jtenos.com
RSS
|
 |
 |
Monday, September 01, 2008 03:01:23
.NET is a failure?
Category: Technology-General
Some blockhead at PC Magazine wrote an article called 21 Great Technologies That Failed. It gives 10 Microsoft and 11 Apple examples of "failures". Most of the stuff is reasonable, like WebTV and Mac G4 Cube - but they somehow slipped .NET into the list, saying everyone went to Java, and that .NET "has nowhere near the scope that MS had envisioned back in 2002". What an incredibly stupid thing to say! .NET not only caught up with Java, it surpassed it years ago as the dominant development technology. While there is still plenty of debate as to which is "better" (.NET gets my vote for most, but not necessarily all, situations), there is absolutely no doubt that .NET is nothing short of a tremendous success. Jeremy A. Kaplan and Sascha Segan (the writers of the article), and the PC Magazine editors who allowed this nonsense to be published, should all be fired immediately. |
Comments:
Add Comment
Sunday, August 31, 2008 00:09:30
Dvorak
Category: Misc.
I've been working on learning a new keyboard layout, the Dvorak Simplified Keyboard. This is supposed to provide an alternative to the standard QWERTY layout, making it easier to move from key to key, thus increasing speed and reducing strain on the wrist and fingers.
I bought stickers to put on one of my keyboards, which helped to get me started. After just a day, I memorized the layout, and switched back to my regular keyboard. Now it's just a matter of getting used to it, and improving on my speed. So far, after 3 days, I'm up to about 10 words per minute, compared to my current 90 on a QWERTY. My goal is to get to 100 WPM on the Dvorak - if it really is a more efficient keyboard, I should be able to do it.
You may be wondering why I'd do this - I already type fast, and I've never had any complaints of hand strain. I guess I don't have a good reason, other than "Why not?". Kind of like learning an obscure foreign language - doesn't really provide a useful skill, but it's fun to know something that most people have never heard of.
FYI: I typed this entry on a Dvorak layout - only took about 10 times as long as normal. |
Comments:
Add Comment
Monday, August 25, 2008 22:48:58
British Tax Dollars At Work
Category: Misc.
British scientists have discovered that herds of animals tend to align their bodies in a north-south direction - some scientific nonsense about magnetic fields at the north and south poles.
My favorite line of the news article, possible the greatest thing I've ever read: The scientists were unable to distinguish between the head and rear of the cattle.
The article can be found at:
http://newsvote.bbc.co.uk/mpapps/pagetools/print/news.bbc.co.uk/2/hi/science/nature/7575459.stm. |
Comments:
Add Comment
Saturday, August 23, 2008 23:43:37
5 things Hollywood thinks computers can do
Category: Misc.
Comments:
Add Comment
Thursday, August 21, 2008 08:35:06
LifeLock - Part 2
Category: Misc.
Last month, I wrote a short review on my initial experiences with LifeLock, a company that protects your identity by handling various tasks related to your credit, such as registering and renewing fraud alerts and removing you from junk mail lists, backed up by a million dollar guarantee. At the time, 45 days had passed since I had signed up, and I still had not received my credit reports.
About a week after that post, I received my first of three reports, and the second came in a few days later. However, here we are, 3 months after originally signing up, and I still have not received the third. A few days ago, I send a message to LifeLock informing them that I had not received my third report. As of this morning, they still have not even acknowledged my message. I guess this answers the "How's their customer service" question. Any legitimate company should send a follow up email within 1 business day, even if it's just something like "we're looking into it".
Based on what I've seen so far, it looks like at the end of this contract in May, I will not be renewing. There are plenty of alternatives out there, and I'll find one that actually delivers in a timely manner, and provides reasonable customer service. |
Comments:
Add Comment
Sunday, August 17, 2008 14:01:27
C# Extension Methods
Category: Software Development
I apologize for not posting anything for a couple of weeks - I've been incredibly busy with work, and with a personal project which I hope to release within the next couple of weeks. I'm designing an "RSS feeder", which will allow users to view their favorite RSS feeds (blogs, news articles, etc.) in one centralized location. Once it's ready for initial beta release, I'll post an entry with more details on that product.
For now, I'd like to follow up on one of the new C# 3.0 features, Extension Methods. Basically, extension methods allow you to add methods to existing classes, even classes inside the .NET framework, by using a special syntax inside of a static class. A simple example follows:
// The following adds a method to System.String, which allows you to count the number of a particular character in that string.
public static class ExtensionMethods
{
public static int CountChars(this string s, char c)
{
int counter = 0;
foreach (char currentChar in s)
{
if (currentChar == c)
{
counter++;
}
}
return counter;
}
}
// You can call this code by simply using the dot notation on a string:
string textLine = "This is my string.";
int numberOfIs = textLine.CountChars('i');
Of course, you can do this the old fashioned way by calling:
int numberOfIs = ExtensionMethods.CountChars(textLine, 'i');
But the new way has a syntax like regular string methods, which makes it nicer to read, and more clear what you are accomplishing. In addition, with Visual Studio, the Intelli-Sense picks up this method when you type the dot after the string, so you don't have to think about where that method lives - all you need to do is find it in the Intelli-Sense list.
In ASP.NET web applications, I've found an additional use that is pretty nice. With most web apps, it's a given that you'll be using Session variables, Application variables, cookies, and other state variables. Extension methods can be very helpful in this aspect, allowing you to call individual variables with compiled code, instead of forcing the developer to handle proper casting and calling appropriate keys inside page logic. For example:
// Old way:
// In Global:
public const string APP_USER_KEY = "APP_USER_KEY";
// In page code:
AppUser currentUser = (AppUser)Session[Global.APP_USER_KEY];
// or
AppUser currentUser = {fill in the blank};
Session[Global.APP_USER_KEY] = currentUser;
// New way:
// In ExtensionMethods.cs (or any static class):
private const string APP_USER_KEY = "APP_USER_KEY";
public AppUser GetCurrentUser(this HttpSessionState Session)
{
return Session[APP_USER_KEY] as AppUser;
}
public void SetCurrentUser(this HttpSessionState Session, AppUser appUser)
{
Session[APP_USER_KEY] = appUser;
}
// In page code:
AppUser currentUser = Session.GetCurrentUser();
// or
AppUser currentUser = {fill in the blank};
Session.SetCurrentUser(currentUser);
There is a little more code involved when you do it this way, but it is much safer. You control the type of variable getting assigned to the session variable. You can define custom exceptions when setting or getting this variable - for example, if you get a session variable the old fasioned way, and it's null, your page code just gets a null, and you have to handle it in your page. Using extension methods, you can throw a custom NoUserLoggedInException if it's null, and let it get handled by shared code. Also, you can assign events to the Get or Set methods, so that your application can track when those variables are assigned or read. Or any other number of custom logic you can think of. The same technique can be used for Application or Cache variables, and also with cookies, by working with the Request or Response objects.
I've started incorporating this technique in my web applications, and it's worked really well so far. The only downside to this technique is that you need two methods, a getter and a setter - this is the "Java" way of accessing variables. With normal variables, I'd use properties with a get and a set section to accomplish the same thing. It wouldn't surprise me if C# 4.0 introduced something like this, but I haven't heard anything about that. |
Comments:
Add Comment
Saturday, August 02, 2008 01:00:12
Money-Saving Tip?
Category: Misc.
In a newsletter I recently received from my bank, there were a few tips on how to save money by conserving gas. Most were reasonable, but one kind of caught my eye:
----------
Fill up when you're almost out - Fill up your gas tank less often and you could save $100 a month since you'll be hauling a lighter load between fill-ups.
----------
I ran a few numbers:
At $4.25/gallon, a person driving 1,000 miles per month who gets 20 miles per gallon would have to improve to about 38 miles per gallon in order to save $100 per month.
If you drive 2,000 miles per month, your mileage would have to go from 20 to 26 to save $100 per month.
I find it just a little hard to believe that waiting until your gas tank is almost out before filling up improves your mileage that much...
But if you are crazy enough to drive 2,000 miles per month and only get 10 miles per gallon, you'd only have to improve to 11.3 in order to save $100. Still probably not realistic, but it least it's not totally ridiculous.
I'm not saying that it was bad advice - I'm sure there is some truth to their tip, but gasoline only weights about 6 pounds per gallon, and there's just no way that a few extra gallons can make that big of a difference. |
Comments:
Add Comment
Tuesday, July 29, 2008 19:13:53
Cuil
Category: Technology-General
There's a new search engine out there, supposedly a "Google killer", named Cuil (pronounced "cool"). I don't know a lot about it, other than that it was built by a lot of former Google employees, and that it crashed on its first day. You'll find thousands of blogs out there already talking about this search engine, most of them more knowledgeable than I am.
I just wanted to give a few examples of some basic searches I've done to test it out - I tried the same tests on Google, and received much better results.
Searched for: cuil
Result: Didn't even provide itself or anything related to it as a search result.
Expected Result: #1 should be Cuil.com itself, followed by blogs, news articles, etc., related to the site.
Searched for: cuil search engine
Result: Only 3 results, and none of them related to cuil.com
Expected Result: Practically identical to just searching for cuil
Searched for: cuil.com
Result: Search results contained information regarding the domain, such as the Whois information, but nothing related to the search engine.
Expected Result: Practically identical to just searching for cuil
Searched for: joe enos
Result: My homepage was not even on the first page of the results
Expected Result: My homepage should be the #1 result.
Searched for: "joe enos"
Result: My homepage was #10 on the list, behind pages that simply had that name somewhere in the page, and some that didn't even have my name anywhere
Expected Result: My homepage should be the #1 result.
Searched for: "joe enos" blog
Result: My homepage was the #1 result, but my blog was not in the search results at all.
Expected Result: My blog should be the #1 result.
Searched for: microsoft
Result: office.microsoft.com was the #1 result. www.microsoft.com was the #2 result, but the title of the result was "QuickBASIC". www.terraserver.com was the #3 result.
Expected Result: www.microsoft.com should be #1 result, and it should be named properly. TerraServer should not be anywhere near the first page of the search results.
Searched for: ipod
Result: www.apple.com was the #1 result. IPod-related pages started in result #2.
Expected Result: IPod specific pages should be the #1 result.
I will say that Cuil has a decent looking user interface, and responds pretty quickly to requests. But before it can even think about competing with Google, Yahoo, or even Live, it will need to significantly improve its search results. In addition, Google, Yahoo, and Live all have additional features that fit nicely into their product, like news, sports, stocks, weather, and hundreds of other things that Cuil doesn't.
Personally, I've found that Google works the best by far for providing search results, and I don't think I'll be switching anytime soon. I use Yahoo for things like news, RSS feeds, and finance. They're the best at what they do, and I think Cuil is in way over their head. In addition, just my opinion, but Cuil is kind of a stupid name. If you do go to that site, make sure you spell cuil correctly - if the i and l are switched, apparently you'll be sent to a site that isn't exactly family friendly - yet another reason to dislike that name. |
Comments:
Add Comment
Sunday, July 27, 2008 18:41:54
Mobile Blog
Category: Personal Software Development
I have added a mobile page to this blog, available at http://blog.jtenos.com/mobile.aspx. The page has the same "stuff" in it, but in a more compact and simpler format, with no javascript, CSS style, or images - the page renders fast and accurately in my new smart phone. The main page should automatically redirect mobile users to the mobile page, so the regular http://blog.jtenos.com/ link can still be used.
Please let me know if you experience any difficulties using my blog with your own mobile device. I have only fully tested it using my phone, which is running Windows Mobile 6 with Internet Explorer. |
Comments:
Add Comment
Saturday, July 26, 2008 22:39:30
Blog Comments
Category: Misc.
Regular readers of my blog may have noticed that I comment on each of the entries myself. Most of these comments talk about how talented, wonderful, and amazing I am. Sometimes I even respond to my own responses. You may think one or two things: 1) I'm a very conceited and arrogant person, who thinks that the world revolves around me, or 2) I have multiple personalities. I just want to assure you that neither one of these is true.
I am very confident in myself and my abilities, but I try not to be conceited or arrogant. And I am in good mental health. My comments are just meant to be amusing, to add a little fun to an otherwise dry and boring blog. There is no other personality in my subconscious responding to my posts. |
Comments:
Add Comment
|
|
 |
 |
|
|
Posts:
Categories:
Archive:
Other Blogs I'm Watching:
|