Checking for Palindromes and Primes
Posted by Jonathan Ng | Filed under Technical
What’s a palindrome you say? From wikipedia:
A palindrome is a word, phrase, number or other sequence of units (such as a strand of DNA) that has the property of reading the same in either direction (the adjustment of punctuation and spaces between words is generally permitted).
Examples of palindromes: “hannah”. You reverse it, you get “hannah” also. So what we’re required to do (for Data Structures and Algorithm), is to read a string and check if it’s a palindrome. I found 3 ways to do it (hey, that’s what algorithm is all about):
The first way, which I think is the quickest method, compares character for character, and returns when a match isn’t found. In Java, something like 5 / 2 returns 2. Note: assume input is the user’s input string. Read the rest of this entry »
Tags: algorithm
Rants on TARC, Again..
Posted by Jonathan Ng | Filed under Personal
So here we have another rant post on TARC, or more specifically, the School of Arts and Science. You see, last semester (advanced diploma, year 1, which is equivalent to a sophomore year) we took “Object Oriented Analysis and Design”. So yeah, we were exposed to OO basics. Our assignment involved designing a system, any at all. Designing here means, doing the analysis, and specifying how the system works - class diagrams etc.
This semester, we have “Software Engineering Practice”. Weirdly enough, the assignment didn’t require us to use any OO language. Hence, students can use VB6 if they like. Most students in TARC are familiar wit VB6, so it’s highly likely that everyone will be using VB6.
We also have a “Data Structures and Algorithms”. The medium of instruction, is Java. Ok, this subject seems fine. But unfortunately for Computer Science students, there’s no Data Structures. Only for Information Systems Engineering students. Weird eh? My friends taking Computer Science, will take something on Object Oriented instead. However, it’s more like a VB.Net subject.
I just don’t understand why the can’t make it compulsory for students to use a OO language. Courses today (at TARC) already lack focus on low-level logics, or in-depth knowledge of particular topics. And yet, they don’t even make sure students can program well with Java (or .Net).
We also have “Database Systems” this semester. Looks promising at first glance, even ambitious I would say. We have 14 weeks in a semester, and they plan to cover SQL Server and Oracle in our 2 hour a week practicals. We spent last week in “SQL Server practical lab”, practicing SQL. So the next time some TARCian tells you “I got learn SQL Server/Oracle before”, he’s talking crap..
All of these, seem to show the lack of coordination within SAS. It seems like subjects/modules are simply thrown together with little regard of the overall effect.
Tags: rants
Getting a Laptop
Posted by Jonathan Ng | Filed under Personal
No, not right now, but pretty soon.. uh, actually I have no idea how soon. I’ve been deliberating over this “when to buy laptop” issue for quite a while. You see, I’m going to UK for a 1 semester “top-up” programme for my degree. Yeah, I know there might be lab facilities there, but nothing beats having your own laptop.
So since I don’t intend to take my masters there, I’ll be back in Malaysia in 3 months. When I start working, I would probably not use that laptop as much.. So if I buy the laptop right before going to UK, it’s sort of, a waste. Hence, this leads to the solution of buying the laptop sometime now. A new (and decent) computer will last a good 2 years. So I could buy one now, and it’ll be in pretty good condition for use in UK.
As for my current PC, well, it’ll probably be sent back home. Bro could use the 17″ lcd if he wants, or I could trade it with s00kwei. Bro could take the extra stick of 256 MB ram too.. Sigh, but I hope that Dad would note that I paid for the lcd and additional ram with myself. Meaning, part of the laptop’s cost goes there..
Sigh.. so should I get a laptop for my birthday? I don’t know.. probably.. but here’s the specs that I’m aiming for:
- Core 2 Duo T7200 (2 GHz, 4 MB Cache, 667 MHz FSB). Too bad you can’t overclock mobile processors..
- 1 x 1024 MB 533 MHz DDR RAM. Not sure the additional 60 bucks for 667 MHz is worthwhile.
- 15.4″ WXGA (1280×800) with Truelife. Though the Ultrasharp (with 1680×1050 res) will be so sweet (and expensive)
- 80 GB HDD. Doesn’t matter much to me.
- Intel integrated graphics. I don’t know how much improvement the X1300 will be, but it’ll cost a good 513 bucks
- DVD Burner. Doesn’t matter if I’ve got limited HDD space.. just burn anything extra..
Currently, those specs (Ultrasharp screen, X1300) will ballon the price of the laptop to 5k plus. A 3 year limited warranty from Dell (with international support for notebooks) will cost ’bout 400 too.. so should I get one for my birthday? Hm.. I’ll probably need time to get used to a laptop’s keypad too..
The thing that I regret now is the UPS that I bought last sem.. wonder what I’ll do with it.. it doesn’t serve much purpose now y’know.. sigh.. should have bought a DVD burner instead back then.. I wouldn’t have lost all my files..
Tags: life
Victimized by Popularity
Posted by Jonathan Ng | Filed under Technical
That’s what I think Microsoft Windows is - victimized by it’s popularity. Microsoft has been always been in trouble with antitrust laws. In Europe and Korea, they have to release special versions that don’t come bundled with Windows Media Player and (in Korea) Windows Messenger.
When you compare Windows XP with Linux and Mac OS X, all 3 OSes come with media players and instant messengers. So why can’t Microsoft do the same? It can be argued that IMs in OS X and Linux are multi-protocol based, as compared to Windows Messenger that uses MSN exclusively. However, IM companies don’t make a dime out of users who connect via multi-protocol IMs, as they are typically ad-free. In my opinion, antirust regulators can only force Windows to let user choose which media player or instant messenger to install during installation. Read the rest of this entry »
The Charge Up
Posted by Jonathan Ng | Filed under Personal
Y’know, it’s nice to hear from people who you think don’t read your blog. Xian Ming did that, Jennie too! So once again, thanks for all you guys who do read my blog. Leave more comments lah..
I’m putting the grudge with my roommate aside. It’s time I learn how to be emotionally affected by little things like it. It’s time for me to charge up, to fuel up for the challenges awaiting me this semester.
Me and s00kwei went Mid Valley on Sunday. As a matter of fact, it’s the first time I went there since coming to study at TARC. Haha.. my main purpose for going that far was to get a book on design patterns. I tried searching for “Design Patterns in C#“, but turned out they don’t have stock. So I saw this one, Head First Design Patterns. Fliping through it will give you a little surprise. It’s unlike any professional book I’ve come across. I mean, it doesn’t contain pages and pages of small words. Instead, it uses a fun, conversational style with plenty of diagrams, illustrations and pictures to explain design patterns. I asked s00kwei’s bro to check it’s rating: 4.5 stars, 150 votes. That was all the convincing I needed :p Read the rest of this entry »
Tags: life