Categories of posts

Saturday, September 18, 2010

linuxNUS Hackers' Workshop series - The UNIX philosophy

The below is what I've learnt from the workshop lecture by Prof. Michael Brown, at NUS LT19 on 17/09/2010 6.30pm - 8pm.

The driving idea of UNIX

  • portable

    • Unix written in C, with some assembly code.

    • Not welded to the computer used

  • multi-tasking, multi-user

  • simple and light-weight

  • use of”flat” plain text files – user-readable code

  • large number of software tools

  • hierarchical file system


Sending messages to other processes: echo “” > dev/pts/

File/device notification:

  • files: can read and write chars or blocks of data

  • devices:

    • char devices (eg keyboard) – read chars, not seekable

      • /dev/pts10

    • block devices (eg HDD) – read blocks of data, seekable

  • pseudo devices:

    • /dev/zero: produces zeros

    • /dev/null: ignores all input, has no output

    • /dev/random: produces a stream of rand output


Unix shell

  • allows “shell scripting”

    • can write “for loop” to create 10 .txt files.

for i in 0 1 2 3 4 5 6 7 8 9

do

touch $i.txt

  • can tie processes together


Selective rules for programming:

  • rule of modularity:

    • write simple modules connected via clean interface

  • rule of clarity:

    • clarity >> cleverness

  • rule of composition:

    • design programs to be connected with other programs

  • rule of user input:

    • do not make programs WAIT for user input

  • rule of simplicity:

    • add complexity only if you must

  • rule of transparency:

    • make inspection and debugging easy – a good man page helps.

  • rule of robustness:

    • program should work well, but if it fails, make sure it fails gracefully.

    • Do input checking

  • rule of least surprise:

    • in interface design, always do the least surprising thing

    • stick with convention (+ means add)

    • avoid excessive features and novelty (max of 3 clicks to go to ANY file on iPod)

  • rule of silence:

    • when program has nothing surprising to say, it should say nothing.

  • rule of repair:

    • when you must fail, fail noisily and as soon as possible

  • rule of (late) optimisation:

    • get it working before optimising it.

Sunday, September 12, 2010

How to allow "limited account" users to change power management plans in Windows XP

Spent a significant amount of time searching for this, so figured I ought to note it down somewhere:

Accreditation: Written by Curtis Clay III (original source here)

1. Log on as Administrator.

2. Click Start , click Run, and then type "Regedt32" (without the
quotation marks).

3. Locate and click the following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ControlsFol
der\PowerCfg\GlobalPowerPolicy

On the Security menu, click Permissions. Either add the users separately,
or add the users' group and give all the users full control over this
key.

4. Locate and click the following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ControlsFol
der\PowerCfg\PowerPolicies

On the Security menu, click Permissions.
Either add the users separately, or add the user s' group and give all
the users full control over this key.

5. In addition, users need to be given the right to shut down the system.
To accomplish this, follow these steps:

a. In Control Panel, double-click Administrative Tools, and then
double-click "Local Security Policy".

b. In the left pane, expand Local Policies and click User Rights
Assignment.

c. In the right pane, double-click "Shut down the system", and add each
user individually or add the Users group to this local security policy.
Making these changes will allow normal users to alter power scheme settings
without being added to the Local Administrators group.

Note If users are running Windows 2000 Service Pack 3 (SP3), an
Administrator must also provide the users with the "Create Pagefile"
permission.

Tuesday, August 31, 2010

PM Lee's 2010 National Day Speech

Points discussed during the speech can be found here.

31 Aug - Interesting news and articles

More help for first-timers

More supply + more loans! Hopefully it'll cool the market until such time I get the chance to buy one..

Intel acquires Infineon’s Wireless Solutions Business For $1.4 billion

Interesting.. Intel just bought McAfee a while ago too...

Since October 7, 2005, I’ve Read 219,651 Stories Via RSS. You?

Only 20,718 for me.. but I started only in Jan this year... RSS = interesting and useful technology tho..

Teaching dollars and sense

Teachers will soon have to learn (and teach) about financial management too! Interesting..

Monday, August 30, 2010

30 Aug - Interesting news and articles

Behind The Bidding War: The Real Reasons Why HP And Dell are So Desperate For 3Par

Interesting article on one of the biggest news in the tech arena recently.

The Full-On Assault On Cable Is Underway

The coming of a new age of TV?

Cisco May Be Making A Run For Skype

Article also mentions that Google may be interested as well, although perhaps not likely to happen cuz of anti-trust issues. Nevertheless, another interesting development in the tech arena.

30 Aug - Key excerpts from PM's National Day rally speech

Some of the key announcements I've managed to catch from listening to about 40 minutes of the PM's National Day rally speech:

Measures to cool market

The gahmen is going to take steps to reduce private property prices in Singapore with immediate effect. From what I understand, need to own for 3 years before re-selling, as opposed to 1 year now.

S'pore to get 3rd med school

Tie-up venture between Imperial College (Britain) and NTU to create 3rd medical school in Singapore (with NUS medical and Duke-NUS being the other 2). Means less foreign imported doctors?

Endowment trust for varsities

Trust funds to be targeted as main source of income for NUS, NTU and SMU. Possibly also polys and ITEs. Gahmen to match new donations to Unis 3-to-1, old donations 1.5-to-1.

Award to recognise NSmen

NSmen to get $9000 in recognition award. To be dispatched in tranches into CPF and PSEA thought, not cash.

Be careful of wage rise

Key message from PM to Singaporeans - economy may be recovering, but don't expect wage rises

IP extends to 7 more schools

More schools to be involved in through-train project. Dual track programme for these schools - entrants either enter directly into IP, or enter the "normal" programme and later apply to be included as well.

Also, through-train for N(A) students after N-levels, bypassing O-levels.

Looks like the future = no more O levels.

HDB to raise income ceiling

Income ceiling for DBSS raised from 8k to 10k. Ceiling for BTO remains at 8k.

Hope this doesn't raise competition for DBSS/BTO too much..

New talent division in PMO

Immigration policies getting so complicated that new division required? New division to be handed to Minister Wong Kan Seng's portfolio.

Foreign worker levy to rise

Hmm.. and this change is coupled with the supposed influx of 45k Bangladeshi maids..

Leave gambling to foreigners

Kinda of make sense.. but I'm not entirely sure that saying this publicly (where international parties could also see/hear it) is exactly.. well, prudent.

$60b boost for MRT network

Apparently the trains network is going to be doubled with this investment. Also, trains to arrive every 100 seconds, as opposed to 120 seconds during peak hours..

However, looks like it's about time to get used to a complicated train network and changing trains at interchanges.

Sunday, August 29, 2010

29 Aug - Interesting news and articles

Game addiction suit can continue

So now it’s the game developers’ fault that they make too good a game?

Man cuts off penis at airport

You haven’t seen “desperate” until you’ve seen this..

Orientation camp a pain

Given my recent involvement in the NUS engine and Oweek camps, lucky it’s the NTU camps that are getting the bad press..

Casino ban for top execs

Wonder if this counts as workplace intervention into their employee’s private lives?

Thursday, August 26, 2010

26 Aug - Interesting news and articles

Google Voice Phone Booths To Start Popping Up In Airports, Universities
Interesting.. Wonder if one would show up in NUS?

Women, minorities biggest users of mobile phones, survey says

Finally.. the answer to: who talks the most (on mobile phones)

Use Gmail to call

Only 1 word to describe this: COOL!

Sports Hub deal sealed

Oh.. FINALLY they're going to tear down the National Stadium.. Tot it's becoming the National Museum oredi..

25 Aug 2010 - Interesting news and articles

Man held for FB remarks

Well, I guess.. Even if online avenues to voice your opinions, "don't anyhow say" is still very true..

British Newspaper Daily Mail Plants Job Advert In Robots.txt File

Very interesting way of finding just the right employer they need!

Preempting Search

Enlighting article on where search engines stand now.. and how to beat Google..

Panorama: Mozilla’s Awesome Tab Feature Gets A Name And Included In Firefox 4

Looks promising..

GameCrush Is Crushing It. Investors Agree.


Interesting idea.. wonder if it'll EVER take off in Singapore tho? LOL.

Tuesday, August 24, 2010

24 Aug 2010 - Interesting news and articles

How to 'undo' an ill-advised Gmail message

Interesting.. Though I suppose it could work also if you took the time to read and think through that email you've just typed, especially if you're not quite in a good emotional state..

Ways to catch N-Day rally

The Singapore gahmen's indeed catching up with the times.. with the ND rally being made available on Smartphones as well! Which kinda makes me glad that I'm living in Singapore.. and am (hopefully) going to be in the IT industry in the future!


Oh, besides that.. Heard that there's lots of good predictions covered during previous speeches.. So everyone should probably at least read the excerpts of the speech!

Ebola breakthrough discovered

Hopefully research into this area pulls through.. Heard that Ebola's one of the world's most scary and deadly viruses. .

Smartphones to reign

Again, makes me glad that I'm probably going into the IT industry..

Pedestrians 'can't hear' Prius

This one's interesting.. which brings to mind the slogan: "It's so quiet... that it's too quiet!" LOL.

Germany To Outlaw Employers Checking Out Candidates On Facebook, But Googling Is OK

Ok.. Guess the surprising thing is that it ACTUALLY requires a law to stop employers from doing that.. Which means.. a lot of employers are doing it. So better be careful about what you do on FB then..

Fraudsters Drain PayPal Accounts Through iTunes

Not as if we need another reminder.. But people, please be more security conscious and don't disregard security for convenience..