CSS, Forget About IE, Shall We?

During work, colleague came across with a CSS problem, which only IE show that problem among Safari, Chrome and Firefox. Changing the CSS might cause a lots of style lost in all pages, adding class will need to add the class property to all the input we need to format. For we decided to let IE skip the formatting.

IE does not understand the child level formatting, for instance, if we would like to format the body tag, and the body tag is in html tag, so the relationship will be html > body.

So instead of using this:

body { 
  background-color: #FF00FF 
}  

we use this:

html > body {
  background-color: #FF0000 
}  

So when IE hit the html > body, it will simply ignored it 🙂

October 22, 2009 Â· Stephen Saw

VB.net’s Not Commonly Use But Handy Short-Circuiting Logical Operator

As a programmer, always get to fix bugs and adding in feature in existing program, well this happen to most of all new programmer. Every program have and should have logical operation, which using IF AND ELSE operator. In VB, there is a handy operator provided, but I have not seen it in all those codes I’m taking over from previous project, and myself not even using it until not long ago, and it is handy.

The short-circuiting logical operator AndAlso and OrElse, it serve the same purpose as normal And and Or, but it skip the following condition check if the first one does not meet the condition.
For real life example I’ve face recently, considering a field in database is suppose to contain int value, but it can be Nullable, so, on the front end, we would like to get or maybe convert the value to string and do something with it, so basically it will go like this

If Not myDataReader.IsDBNull(0) And myDataReader.GetString(0) "" Then  
 'Do something here  
End If  

note that this statement will cause exception, where the value is Null . Because when using And, it will check all the statement before deciding whether to execute or not. It could have be better with this:

If Not myDataReader.IsDBNull(0) AndAlso myDataReader.GetString(0) "" Then  
 'Do something here  
End If  

By using AndAlso, the second statement will be skipped if the first statement is false, which mean it save time, and prevented exception in this case. The same goes to OrElse. 🙂

October 15, 2009 Â· Stephen Saw

Spotlight for Windows

I’ve fooled around with Mac OS X for quite some times ago, and I’m quite impressed by the Spotlight performance, it works very fast, and pretty well. Well, Vista had been said that built in with an indexing search, but it does not works very well out of the box. It often can’t find what I want.
There are bunch of search tools around, a good one might be Google Desktop, but most people are worry about their personal data being indexed by Google web engine, and I’m one of them, so I decided to skip Google Desktop for the few search apps I found. Most of these apps I found is a Mac’s Spotlight clone.

MacSearch

This Spotlight clone apps’ interface is clean, it is just a small bar, with a Mac style text box there. It provides customization on the file type to be index and position of the bar, even for shortcut key as well. The search result show in a list below it in a Mac style list, show in group of file types. Internally MacSearch using Locate32 as the indexing services, and itself provide the frontend interaction to the user. As most of the search apps, it will run indexing for the first run, and generate a .dbs file in the directory, to keep all the indexing records.

Performance
After indexed, the searching speed is at quite acceptable speed. Also it take a while for it to indexed the newly created files.

My Thought
This apps look clean and neat, fast indexing speed, acceptable search speed. But it take some times to index the newly created files. A pain of the clean UI, it cannot be drag to other place, you can change the location, but only with modifying the setting, as for the setting, there are only 2 setting for placement, margin from top and margin from right, which is hard to estimate. The search result list always show on the bottom of the bar, mean that we can’t place the bar on the bottom of the screen.

SearchSpy
Developed by an user in a community, it has a almost similar UI as the MacSearch, but with shorter bar. Apart from user can set the file type to be index, user can customize the color of the bar, by changing the color slider, but I having hard time getting gray. Beside having a bar UI, it also have a normal windows style UI, of course, with Mac style. It use Google Desktop if available or Locate32 as for the index. After installed Locate32 and ran the indexing, I’m not able to get it run, and there are bunch of people complaining it is not working. It have advantages of GUI over MacSearch, where it can be place at any place on the screen by dragging it.

Locate32

Locate32
Locate32

As MacSearch and SearchSpy both using Locate32, so I give it a try. Is not a Mac’s Spotlight clone, it is a normal and dull looking apps. It have few type of download, 32bit, 64bit, installer and zip file, which is very nice offer.

Performance
After extract/install, as usual, index should be run for the first time. It provide a cool executable file to run the index, for people who like command prompt, it is awesome, as it run for quite some times, around 30 minutes (depends on machine).

My Thought
Despite of the dull GUI, the speed is quite fast, nearly instant, but felt like it return too much irrelevant result, but I guess it could be tweak for better search.

Spotlight for Win

Is an open source project, it also provide the same interface as MacSearch and SearchSpy. The setting windows is more nicer than the other as it is copying exactly Mac’s style. It also allow changing of the bar color, but with limited color options.

Performance
It is the fastest of all, and it support search as we type, showing the result in groups. And it index the new file almost instantly after the file creation.

My Thought
The setting page not working yet, except for color. The search speed is really fast, but for some reason, it does not index some of my file I tested. Is a very nice apps to have, and looking forward of the new release.

Windows Search
I’m a Windows fans, so I tested it as well. By default, the index setting does not index most of the location, such as other drives. The beauty of it is, it can be trigger by pressing F3 or from the start menu search box at Vista start menu.

Performance
Index run pretty fast, but it take times to index new file. Search speed is normal and often return no result, and interface is more complicated than the other Spotlight’s clone.
As for my own verdict, I will like to stick with Spotlight for Win and perhaps using Locate32 as backup.

Spotlight for Windows part 2

October 14, 2009 Â· Stephen Saw

Lorem Ipsum Dolor Sit Amet

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Well, above is just a portion from well known (at least for designer) text used as filler text or dummy text when one is designing something, specially web pages. These text make the design looks more toward to end product where the text is filling in to the placeholder, regardless what language is it, it do make designer easier to have a visual idea of their design.

Look it up here

October 12, 2009 Â· Stephen Saw

BumpTop – Oh yeah

The title of this post is BumpTop – Oh yeah, this is because I’m so totally out of my words!!! OMG! This is so totally awesome!!

Well, it does reminded me, long time ago i had installed similar desktop thingy, but it certainly not as good as this one. Well, is basically best use with multi touch machine, but since I don’t have any, I still tested it on my Vista machine, which draining my system resource drastically. *doh*

BumpTop desktop interface
BumpTop desktop interface

With a free edition, of course limited functionality, but works pretty good for basic user. On 3 edge of the screen, is the wall, well, just imagine it as the cube in the office, where we got 3 “wall” thingy for us to stick something on.

Most of the thing, I guess, can be stick on the wall, and for quick access. As shown in pictures, as a programmer, you’ll got piles of paper (source file) works piling on the desk, is freaking cool! Have to install it in my home machine, for sure (if it didn’t suck all my system resources).

This also reminded me of one video I’ve seen long long time ago, is a guy from Microsoft who is in charge of designing the GUI, or explorer, they came up with the idea similar to BumpTop, which brought me to the program that is similar to BumpTop I’ve installed last time. But I’m not a so touch screen user, beside on pocket pc, I guess it still works if we go on with the new Wacom Touch, totally cool combination.

October 9, 2009 Â· Stephen Saw

Forward E-Mail Should Be Like This

Is been a while I receiving forward mail from friends, specially some important news, or information, they will mass forward the mail to almost all of the contacts in their contact book, I guess. Well, they have omitted some simple or should I say proper way to forward those informative mail, put aside those kind of mails that required history to be kept, such as business related mail.

These is how I felt a forward mail should be:

Always use BCC

First, they included everyone in the TO field, which simply mean everyone who received the mail could see the other recipients’ e-mail address. Is not a big matter of course, but, there is potential of spammer will get their hand on the e-mail addresses that came conveniently to them. Trust your friend enough? Never, even though you trust your friend to use your e-mail address for something else, but who knows, they forward the mail to their friend, and their friend forward the mail to their friends again, keep on going and that’s it, whole bunch of e-mail address falls in the inbox of the last batch of the recipients, who knows, some of them might use the address for something else.

Solution is simple enough, use BCC, I’m not sure if there is way to crack the address out, but for sure, it will have the guy who cracking the addresses spending more times, and end up loosing interest to do so.

Always remove unrelated text or duplicated content

Sometimes when I receive a forward mail, beside there are hell lots of e-mail addresses, there are few duplicated content, images, due to sender didn’t remove those content before forwarding it out. So what the big deal since now all having broadband connection, what’s wrong with extra text there?

Put aside images that simply goes up to megabytes, usually when one sending out email using web mail, there is always some text or link at the bottom, such as “Use windows live mail bla bla bla”, or “Yahoo mail bla bla bla”, with some line there, imagine 10 people forwarding that particular email, 10 of those rubbish text will be added at the bottom, let’s not forget about the e-mail addresses, appended each forward, and the content will only appear in the middle of all those rubbish contents, imagine one need to scroll all the way down to bottom just to see few sentence or few images.

For example, here is the email I received:

Forwarded email before edit
Forwarded email before edit

Above is the screenshot of the mail I received, note that the two images are the same, and the file size is 198KB (for the sake of example), after I removing all e-mail addresses of past recipient and rubbish text embed by web mail, here is the result

Forwarded email after edit
Forwarded email after edit

Just realized that there are two same images after I sent out, the point is, note on the size, 155KB, also note that the actual content of the mail can be seen right on the top rather than needed to scroll down to get the content. Few KB won’t hurts, but what if the mail is regarding some nice photos, each photo around 1MB, and there is 5MB, look at how the size grow.

Well, is just my habit to BCC and edit every forward mail contents before forwarding it, practice this habit, and help to protect others’ privacy and make reading e-mail simple and fun again.

October 8, 2009 Â· Stephen Saw

Wireless Power

Recently Sony is working on their new technology, wireless power, yes, powering up TV set and other electronic devices without having cable strangling around, for cleaner environment.

According to news, Sony is only able achieved 80% of power efficiency, and will eventually dropped to 60% if frequency is misaligned, sounds like more power lost over the air, well, at least it is still in development stage. There are some simple and common concern regarding wireless power, will it do any harm on human who is sit in between where the power is transmitted? Will the power out of frequency or loss will transmitting?

Trade off, there is always trade off, to use this wireless power technology, is to have bulky power transmitter sitting on your desk, well, at least it look more neat than having cables clustering all over the desk, but is good only if the wireless power can power multiple devices. This is the technology that I wanted to see, go Sony!

Read more here CNET and Gizmodo

October 7, 2009 Â· Stephen Saw

Microsoft Security Essential

Finally Microsoft discontinued their Live OneCare that didn’t get any good review, and the worst thing is, it cost us. They had came out Microsoft Security Essential to replace the discontinued Live OneCare, which included anti-virus, anti-spyware or malware in one real clean interface, and memory friendly suite, and it is FREE!

Microsoft Security Essentials main screen
Microsoft Security Essentials

With only 4 tabs on the interface, it is very easy for users, specially home users to configure the suite. With a green bar on top, a green monitor white a tick, showing that our system is protected, while it change to yellow/orange for minor warning and red for immediate attention needed, which is very neat for user, a quick look on it will immediate let us know what is the system protection status.

Microsoft Security Essentials update tab
Microsoft Security Essentials update tab

Second tab is really straight to what anti-virus software need, update. The update tab show update history, and with a real big “Update” button, wondering no more and just click the button to get the job done.

Microsoft Security Essentials history tab
Microsoft Security Essentials history tab

History tab showing all our threat alert history, quarantined item, deleted item in one clean page.

Microsoft Security Essentials settings tab
Microsoft Security Essentials settings tab

On setting tab, there is a Microsoft SpyNet option to subscribe to Microsoft SpyNet, with the options of Basic or Advanced, where it will send our threat information to SpyNet. With Advanced membership it will send more information to SpyNet, and is good that it explain on the option itself rather than at license agreement which people rarely read it.

Based on my 2 of many review site, which personally prefer, CNET and Softpedia, the Microsoft Security Essential suite get good review from both of that sites, which throw OneCare far away from it. But in CNET, they mentioned that the bad thing is it only works for legitimate Windows install, because it need genuine check before we can download, but I don’t see anything bad about this, come on guys, you can’t ripped of people’s hard work forever, give something back, grow up and pay for what you like, make yourself a bit more respectable.

I installed MSE (Microsoft Security Essential) to replace my free Avast copy, which have cluster interface, annoying popup and the notification human voice (IMO), for a user like me, who like to install and forget, MSE is done a better job, and is easy to look at too 🙂 . One thing is, MSE really made me forgot about it, not too sure if is only my machine or is it behavior, it doesn’t show at system tray like most of the antivirus software do, and it stay hidden with Windows Defender, happily ever after.

Got myself an infected file by allowing network user to write on my share folder (gosh, who is that anyway, wish I know how to trace it), and here is MSE in action, cleaning the infected file.

Cleaning Infected File
Cleaning infected file

I think MSE will do good in it’s future, since is a baby from Microsoft and run on Microsoft Windows, which might reduced potential of false alarm, since Microsoft should know well with the files in their Windows. But wait, where is the Email protection, I don’t see no Email protection settings anywhere on those 4 tabs, well, someone in Microsoft communities back it up with the article Why You Don’t Need Your Anti-Virus Program to Scan Your E-Mail. Check it up.

October 2, 2009 Â· Stephen Saw

Visual Studio 2005 Can’t Debug On IIS7.0

Well, usually I will store my web project in default web folder, due to some reason, I want to create the project on IIS instead, allowing remote access with the afford of helping in testing.

When the debug started, Visual Studio show error message

Unable to start debugging on the web server. Debugging failed because integrated Windows authentication is not enabled. Please see Help for assistance.

To fix the annoying problem, simple have Visual Studio 2005 service pack 1 installed, and apply the hotfix kb937523 . After applying the update it works!

October 1, 2009 Â· Stephen Saw

Vista? x64? Anyone?

Over the years, since Vista launched, heard about many people complaining the compatibility issue, driver not workings, slow, can’t play most of the game. Personally I have using Vista since RTM release, frankly, I switched back to XP after a week using Vista, yes, the reason is slow, but is slow in term of, I’m a developer, I always running virtual machine, development tools that resource hunger, database server, email, which most of them will drained my memory very fast.

With only 1GB of RAM, I switched back to XP after frustrated of the speed, but, how many of people out there still running their XP with 1GB or less of RAM? Still have, but getting lesser. Vista too much eye candy? Well, stop complaining and switch to Vista basic. In some people’s mind is like Vista’s major and only changes is the Aero, this is not true, the kernel itself is being 6.0, which XP is built on 5.x, major version increase means there are quite a number of changes on the system. Changes on new release not necessary only those that is visible, most new update/release tends to patch/update the backend codes, so that it works better.

Compatibility issue quite often used as excuse to not upgrade, put aside serious and businesses that established long time ago, which mostly is using legacy software, home user, and even developer that not building legacy apps, IMO, I don’t quite understand why this issue affect this group of user, even if some software doesn’t works anymore, the vendor will release update very soon.

Which then compatibility issue also brought up in x64 migration, personally running Vista x64, switched over from x86, well, switching over itself didn’t cost me extra, since Vista (I believe home edition doesn’t have) shipped with both x86 and x64 DVD.

After switched over to x64, my Unlocker isn’t working any more, which I replaced with LockHunter, and….that’s all for software, while some working software available in x64 flavor. Driver wise, my hardware vendor supplying compatible driver for me, so without any sweat I migrated to x64 environment.

Well, heard that some game do not work in Vista, so far every game works pretty well for me, except Red Alert 2, which the IPX protocol required for LAN game is not available in Vista, to skip all the trouble and risk setting IPX on Vista, I got it run inside my virtual machine with excellent performance! Well, PC is not suppose to be a gaming device for hardcore gamer, get a console and save the game compatible issue.

Isn’t that bad to switch to x64 environment and Vista, is 1st October, Windows 7 should shipping anytime in this month(hopefully), looking forward to see more adaption of Windows 7, nothing is not working, find an alternative and things will working again.

October 1, 2009 Â· Stephen Saw