January 2009 - Posts

Reviving The Workstation
13 January 09 10:36 PM | adrian | with no comments

Well, some of you may know that I'll be doing my pet project again now that I'm free of day job. To do that, I will need a workstation.

For the past year, I was stuck to my trusty laptop for all code/net/entertainment function. It does the job, but just.

I can definitely code small projects on it, I can surf the Internet (now with Google Chrome, everything seems faster!), and I can run Colonization for DOS on it (WTF!?).

I can't run full blown project with TFS + SQL + SPS + VMs. I can't run Google Earth any faster. And I can't run the latest game (such as Fallout 3) on it.

So going back home, I was thinking about reviving my old desktop as a gaming *** working rig. The story of my old desktop went back from my university days... (went flash back)

Being a poor student back then, I can only put the best CPU on my desktop. I can't afford more memory, I can't afford GPU, I can't even afford a new hard drive! So the first inception of the machine was a high end CPU on a low end setup. Below was it:

Intel Pentium 4 3.0E GHz (it's the second best of its class, the one with Hyper Threading technology) + Intel D865PERL (I guess Intel and Intel makes a great combo) + GeForce2 MX 440 (hint: it runs Counter Strike) + 512 Mb of RAM + Maxtor 60Gb (it was Maxtor's age).

It ran Windows XP, VS2003, and Counter Strike. I even had a CS party at the university lab with this rig.

After saving enough money for some upgrade, the desktop finally got a little more juice. GeForce2 is out in favor of newer but low end GeForce FX5200, and I also slapped in 2x512Mb to make it 1.5Gb in total. The HD was failing, so I've made a trade in to Seagate 80Gb (Maxtor was bought by Seagate). I've changed the power supply to ThermalTake 450W since the previous one failed as well.

It ran Windows XP and Windows Vista, VS2005, and still, Counter Strike. Although newer games like Need for Speed: Most Wanted and Company of Heroes runs as well on lowest settings (with occasional graphic glitches).

Afterwards, I went off to Singapore. Add one year plus, before I went back, I bought some more juice to finally put the platform to its ultimate settings... (went back to current time)

The FX5200 is out in favor of ATI Radeon HD3850 (yes, they made this beast chip in AGP flavor!), and I slapped in 2x1Gb to make it 3Gb in total. This is the best value combination for 32 bit system, more than that and it won't be detected and won't make much difference.

It now runs Windows Vista (and Windows Server 2008 in VPC), VS2008, and of course, Fallout 3 (by the time of writing, I've already reached the end)!

Here's a shot of the Windows Vista Experience Index, as you can see, the only component not upgraded (CPU) has the lowest score, while the high end GPU maxxed out Windows Vista index.

Revived Rig

Looking back, I've always cherished buying the first setup. It was an aging platform for Intel 865 (Pentium D with Intel 875 was going mainstream), but I got the second best processor available for it. It was still a bit expensive, but not that expensive for such power. And it's expandability is still going strong even until today, five years down the road.

Of course, I won't be bringing this desktop to my next day job. It's too big to bring, so I'll be building up a new one! But that's another post altogether.

Share this post: | | | |
Filed under:
Logics: SQL or Code
11 January 09 01:32 AM | adrian | with no comments

One of the common pattern I found during my enterprise application development last year was moving the bulk of the logic to the persistence layer using SQL. Thankfully, we're a .NET shop so I wrote T-SQL mostly. But the question then: does 3-layer separation architecture really fits enterprise scenario?

Before answering the question, I would like to give some perspective on why logic was moved to database layer.

The first encounter was performance problem. The logic involved a huge data set (not System.Data.Dataset object), do complex operation on it, and return a set of data back as an output. In this scenario, putting the logic in the code will not make much sense, because obviously we will lose performance gains from large data set operation optimization you're buying from the database server vendor. If you're not using this DB feature, might as well convert your persistence layer into XML file.

The second encounter was logic protection. The client defined two separate teams, in house developers doing SQL, consultants (that's me) doing front end. The SQL will contain sensitive logic and will not be accessible from outside the server, in other words, I can only execute a SP but not open or modify it. In this scenario, putting the logic in the SQL will guarantee code security, controllable by ACL on the server. This is safe, unless someone hacked into the server, of course.

Now in both scenario, it's perfectly okay to place your logic in the persistence layer, or should I say it "persistence-logic layer". Just as UI layer may have additional UI-logic layer, so does this.

To give a balanced viewpoint, I do use 3-layer architecture. I believe that persistence layer should provide only basic CRUD operations (get, add, update, delete). These operations will then be orchestrated by the business logic layer. The problem is, for some scenario, the orchestration was very complex, that the benefit of having clear division of responsibility in terms of small functions outweighs the performance hit it cause. When it hit this stage, only then we can move the logic closer to the persistence layer.

So the answer to the question at the beginning of the post is: it fits, up to a certain extent. These patterns are for reference purposes only, and does not always mean that you have to follow it to the letter. Be flexible, and pick the best solution for any problem.

Share this post: | | | |
Windows 7 Beta is Out
08 January 09 10:47 AM | adrian | 1 comment(s)

Available now for early adopters via Connect and MSDN/Technet Download. Available to public next Monday.

Connect site:

https://connect.microsoft.com/windows7 (registered user only, use the download link on the left hand side)

MSDN/Technet Subscriber Download site:

https://msdn.microsoft.com/en-us/subscriptions/securedownloads/default.aspx?pv=36:350

or

https://technet.microsoft.com/en-us/subscriptions/securedownloads/default.aspx?pv=36:350

Share this post: | | | |
HOWTO: Work in Singapore
08 January 09 10:09 AM | adrian | 3 comment(s)

I've promised this post earlier, so here it is.

Well, the first step is to go find a job! I'll tell you a secret, Singapore is so damn small that they have to rely on foreign talents to grow their economy! I've worked with different teams in Singapore, and this holds true... there are hardly any Singaporean in all of my teams. The majority are foreigners, so don't be discouraged.

Finding a job in Singapore is also easy. There are several Internet sites providing job vacancies, on top of my head are www.jobsdb.com, www.monster.com, and www.st701.com. But of course, not all company in Singapore is good company. I've heard horror stories from other Indonesians in Singapore regarding their employers. So do your homework! The company you're applying to should have at least a decent web site. Why? Because Internet in Singapore is so reliable that if you find some business with ugly or no web site at all, that business is guaranteed a very shady business.

There are two kinds of employer in Singapore, direct employer and agency employer. Direct means you're working for your employer, while agency will somehow act as an intermediate entity between your true employer (which the agency call client) and yourself. There are different pros and cons between the two, but most of the time they're well balanced. So it doesn't really matter between the two.

After you found a nice job in a nice company, the next part is applying. Now ditch that templated resume or CV, start fresh! There are a lot of good samples of great resume out there in the Internet. And keep this in mind, your resume should be unique for each job you're applying. This is because every job is unique as well! You don't want to let the recruiter feel that this is just another applicant, right? Do sharpen your English as well, Singapore is first and foremost an English speaking country. Mandarin Chinese and Malay are secondary, you don't need it to survive, though knowing a bit will help a conversation!

If that step went through, next part will be interview. Your first interview will be most likely over the phone. Now let me tell you, Singaporean English (called affectionately Singlish) is awful. It's not even close to their British roots! No matter how good your English is, you will find it hard to understand what they are talking. This is normal, and nothing to worry about. As long as you speak good English, they will understand you somehow. My trick was using e-mail as primary communication, since almost everyone have and read their e-mail, it can even be considered as legal evidence.

Other than phone interviews, sometimes (but not always), you will need to do physical interview. If you're reading this now, most likely you'll be able to get there cheaply because our exit tax is finally exempted! The cheapest way to get there was by plane to Batam and then by boat to Singapore, but now things changed. Cheap airlines and free fiscal tax is definitely worth thinking about. And of course, it's always a good thing if you can do more than one interview at the same time.

Now, if everything is good and you're about to sign on the dotted line, a.k.a. employment agreement, do think about living costs in Singapore. Last year, living in Jakarta is cheap, dirt cheap. I barely hit 1 million rupiah on monthly expenses (excluding place to stay). Hitting Singapore, it rose to almost twice that amount for living cost (excluding place to stay). But now that I'm back to Indonesia, I can tell that now it's not much different. Jakarta is as costly as Singapore, excluding place to stay. If your salary is enough, then by all means, proceed to legal issues!

Every foreigner who works in Singapore will require a work permit. There are two types, S Pass (SP) and Employment Pass (EP). SP is meant for skilled workers, fresh graduates with less experience, while EP is meant for professional workers. The difference between the two are how many of your family member can go with you to Singapore. And of course, having an EP is considered more exclusive. Application for work permit will be done by your employer, you'll just need to sit tight and pray a lot that everything is smooth.

While waiting, it's a good thing to start looking for a place to live. Two paragraphs earlier, I have never included accommodation into the living cost. Why? The answer is simple, it's because accommodation in Singapore is very expensive. I rented a room which monthly cost is as much as one year cost back home! The solution to this is simple, either you pay that much (and lose more money from entertainment and savings) or you move to farther area from the Singapore CBD (and lose more time in transit).

My personal advice on accommodation, as long as it's close to the MRT station and cheap, take it. It doesn't really matter much where because transportation in Singapore is extremely efficient. You can go from one side of the island to the city in half an hour, dramatic improvement over transportation in Jakarta which took more than an hour going from anywhere to anywhere! But then again, it depends on personal preference.

Speaking about accommodation, there are several types of house you will find in Singapore. The most common and the cheapest to rent is HDB Apartments. These are government subsidized housing, sellable to Singapore Citizens. You can't buy this yet, but there are a lot to rent. A level above HDB are private apartments. These range from low rise to high rise, no facility to full condo facility (like swimming pool, gym, etc). A level above that are landed houses, something that we call a real "house" back here. These landed houses are expensive, far from any public transportation (as they are meant for people rich enough to buy a car).

After your permit is approved, you can proceed to Singapore using a social visit pass (a.k.a. tourist visa), and do a medical examination. Proceed to any big hospital and they will know what to do. This usually takes three days, but there are options to pay more for overnight process. This is something you will see a lot in Singapore. If you want it quick, you can pay more than others. A system that is very similar to the one back home called bribery, but this one is more organized.

After everything is complete, you may then proceed to Ministry of Manpower to claim your work visa (to replace the tourist visa) and then immediately start working! Congratulations!

I realized I haven't even talked about living in Singapore and the differences with Indonesia. We'll save that for the future post.

Share this post: | | | |