MindFill - Brian Carroll's Blog

Do While (WhatYouKnow) < (WhatYouKnow + 1)

June 2004 - Posts

SR2Fav - Utility to add SharpReader locked items to your IE Favorites

Although SharpReader doesn't have a lot of fancy bells and whistles, I keep coming back to it after trying the “latest and greatest“ aggregators.

Like most people, I don't have time to read everything that I subscribe to, so I tend to read the headinlines and only drill into the entries that sound interesting.  I may want to refer back to some entries later, so I lock those and delete the rest.  Last night I was thinking it would be nice if I could add all of my locked items to my favorites list in IE.  Well, that sounded like fun, so I have put together this little utility that reads my SharpReader cache, creates a SharpReader folder in my IE favorites list, creates subfolders for each of my subscriptions, and then creates a favorite for each locked item. 

I've provided a link to it here, so feel free to give it a test drive if you would like.

If you have any questions I'll be glad to answer them if I can. 

Again, I wrote this for myself, so the assumptions I was working under are:
Windows XP w/IE 6
SharpReader v0.9.4.1

There are no guarantees that it will work with your configuration, but I'll be glad to work with you in an attempt to resolve any issues.

Posted: Jun 29 2004, 10:00 AM by bkcarroll | with 1 comment(s)
Filed under:
Deleting an NTFS Partition from DOS

If you ever need to delete an NTFS partition from DOS, the Windows NT 3.1 Resource Kit has the solution.  Download the kit, extract the DELPART.EXE utility to a DOS boot disk, boot from the disk and then run the utility.  It's self-explanatory from there.

I wonder why this utility is no longer in the Resource Kits?

Note:  I kept getting a “Page Not Found” error while trying to download the resource kit, but it eventually worked.

Posted: Jun 25 2004, 03:53 PM by bkcarroll | with 1 comment(s)
Filed under:
Parentheses and Order of Operations

It's a good idea to be explicit with parentheses when building arithmetic expressions.  For example, at first the following code doesn't look like it would cause a problem:

Dim i As Integer = 1
i = i + i - i
Console.Writeline(i)

Executing this code will return 1 as you should expect.  But consider what happens in this case:

Dim i As Integer = i.MaxValue
i = i + i - i
Console.Writeline(i)

This code ends with an overflow error which could have been prevented by simply using parentheses like this:

i = i + (i - i)

Should programmers be able to convert from decimal to binary?

When I'm interviewing candidates for a development position I typically write a number down and ask them to convert it from decimal to binary.  Of course this is a very minor factor in the interview, but I find it interesting to see their responses.  It amazes that onle one person out of the last twenty five or thirty candidates I've interviewed has been able to convert from decimal 45 to binary 00101101.  (He also proudly did the hex conversion to 2D without missing a beat.)  Most of these candidates have CS degrees and 5+ years of experience, but from the looks on their faces when asked this question, they either never learned or have forgotten one of the most fundamental concepts of computing. 

Not only is it fundamental, it's also a simple concept.  My 9 and 10 year old sons can do these conversions.  They can do all combinations of decimal/binary/hex conversions.  They think the binary system is the coolest because they can count to 1024 on their fingers.  Thankfully I waited until after they were 4 to teach them.  I could see it now...“Hi Sweetie....how old are you?“ and them showing a binary 4 on their fingers!

So, would the developers you work with be able to do these conversions (without a calculator) or would they go completely blank like my job candidates have been doing lately?

More Posts