My Rambling Thoughts

Quote:

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.

Brian W. Kernighan

News:

Date: . Source: .

Civilian seasonal sets

hobby

LEGO releases small Christmas seasonal sets annually, but has started to release bigger seasonal civilian buildings in recent years.

Civilian sets are all over the place! :clap:

Winter Village Toy Shop (2009)

Winter Village Toy Shop

Product Shot

815 pieces. $125 at Toy Station. RRP US$59.99.

In 2009, LEGO released this holiday seasonal exclusive limited edition set. Phew, what mouthful!

Let's decode the terms.

Holiday seasonal means it is only available for a limited time. In this case, for about 2-3 months.

Exclusive means the product is only available through some sales channel. For example, a product may be exclusive to TRU only.

Limited edition means a fixed quantity is made and then production is stopped. It does not mean few! A truly limited edition will be numbered.

Thus, exclusive and limited edition does not mean rare!

(There's another term "Special Edition" which usually means it has some extra stuff compared to a normal edition. However, it can also mean it is special in some way compared to other sets — and there is no normal edition for this set at all.)

The Winter Toy Shop is very well done and is very detailed. It is obviously aimed at adult fans.

This set was by all accounts very well-received, so much so that LEGO brought it back again for 2010. I'm more cynical and think it did not sell out the first time round. :lol:

Winter Village Bakery (2010)

Winter Village Bakery

Product Shot

687 pieces. $120 at Toy Station. RRP US$54.99.

Yet another holiday seasonal exclusive limited edition set.

The building is slightly smaller than the one in the Winter Toy Shop, but there is more outdoor scene, giving a better ambient atmosphere.

Overall, this is a slightly smaller set and thus is more expensive by comparison. This is still a pretty good set, though.

Winter Village Post Office (2011)

Announced but no other info given. Should be around the same price.

My thoughts

This looks like a regular annual release now. Don't let the winter theme fool you. They work well as regular buildings as well — especially after their roofs are replaced with black or light-tan plates. So far we have one toy shop, one bakery and now one post office! Good times!

Civilian fantasy medieval sets

hobby

It is possible to find civilian sets among every medieval theme.

The London Escape (2011)

The London Escape

Product Shot

462 pieces. RRP $139.90. RRP US$49.99.

Why is this set so expensive in Singapore?

(This makes it perfect for online purchase, especially when there is 20% off...)

I like the coach and the building exterior. However, the building is only a facade and has almost no interior! That's a put-off.

Diagon Alley (2011)

Diagon Alley

Product Shot

2,025 pieces. RRP $319.90. RRP US$149.99.

A perfect fit in a medieval town! But the price... it's like getting a Modular Building.

What I don't like about this set is paying extra for the Harry Potter and fantasy elements that I have no use for.

Given my finite constrained budget, I have to weigh this against some other sets I'm also interested in. One of this set or 3-5 other smaller sets?

Civilian medieval sets

hobby

I intend to use medieval sets to create the older parts of the city.

Medieval Market Village (2009)

Medieval Market Village

Product Shot

1,601 pieces. $210 at Toy Station. RRP US$99.99.

It all started in 2009 when LEGO released this set. It is very well-received because it was very well-done and was one of few medieval civilian sets. Previously it was all castles and soldier-related sets.

It is also very versatile — it works in a modern day country-side setting too.

This set is still available, but is believed to go OOP by this year.

Many people think that this set is a classic and the price will increase tremendously after it is discontinued. I agree with the first part, but not the second. I think people are wise to LEGO economics now — too many people are buying spare sets to sell in the future.

Kingdoms Advent Calendar (2010)

Kingdoms Advent Calendar

Product Shot

167 pieces. $36.90 at ToysHunt. ($39.90 at Toy Station.) RRP US$34.99.

A great way to expand the medieval population!

I was so excited to get it that I overlooked that it only has 5 civilians! It does have a ton of accessories to spice up the atmosphere, though.

Blacksmith Attack (2011)

Blacksmith Attack

Product Shot

104 pieces. RRP US$9.99. Not available locally yet. My estimate is $23.

Previously, I thought I would get this set anyway because it's cheap. I'm now reconsidering because it does not really fit into modern day.

Mill Village Raid (2011)

Mill Village Raid

Product Shot

663 pieces. RRP US$69.99. Not available locally yet. My estimate is $170.

This is the logical successor to Medieval Market Village, but is inferior to it, It is too juniorized, too medieval and there are too many soldiers.

My thoughts

The MMV is a great set! It works for both medieval and modern times. On the other hand, MVR is too much of a rural setting.

Regardless, keep the medieval civilian sets coming!

The Modular Building series

hobby

The Modular Building series is aimed at adult LEGO fans. Each building looks like a scaled-down real-world building, is highly detailed and features advanced building techniques.

Each is a masterpiece.

Cafe Corner (2007)

Cafe Corner

Product Shot

2,056 pieces. RRP US$139.99. Cheapest on BrickLink: US$849.99.

Bare interior.

The price has gone through the roof. Forget about owning this unless LEGO re-releases it. (Which is possible, but I won't hold my breath.)

Market Street (2007)

Market Street

Product Shot

1,248 pieces. RRP US$89.99. Cheapest on BrickLink: US$999.99.

Bare interior.

This commands a premium because it was produced in limited quantity. It was actually designed by a fan, not an official LEGO designer.

An alternative is to source the parts and build it yourself. Even so, it'll cost US$200+. And the colors won't be right because some parts are too rare or too expensive.

Green Grocer (2008)

Green Grocer

Product Shot

2,352 pieces. RRP US$149.99. Cheapest on BrickLink: US$297.50.

Partially furnished interior.

The building is split into two halves, but they are "stuck" together.

Fire Brigade (2009)

Fire Brigade

Product Shot

2,231 pieces. $299.90. RRP US$149.99.

Still available, but believed to go OOP this year.

It's $40 less than the Grand Emporium locally even though they have the same US RRP. That tells us the demand for this set.

Grand Emporium (2010)

Grand Emporium

Product Shot

2,182 pieces. $339.90. RRP US$149.99.

Still available, but believed to go OOP this year.

The most grand Modular Building. The interior is also very well done as well. This is the cornerstone of the shopping district.

Can consider if it's on 20% sale ($272).

Pet Shop (2011)

Pet Shop

Product Shot

2,032 pieces. RRP US$149.99.

Features two buildings, a pet shop and an apartment. Personally, I feel this fits into the City theme the most.

The interior is kind of crammed, though.

How do I feel about this series?

Each Modular Building looks perfect on its own. However, some magic is lost when they are put together. Surprised? Well, when people who have these sets show off their LEGO collection, they all look the same.

Also, due to the Modular Building height and depth, they dwarf and overwhelm other City buildings. They can be simplified easily, though.

The Creator house series

hobby

The LEGO Creator series feature 3-in-1 build. I'm mostly interested in the houses. They are perfect for the City theme, as it has a dearth of houses.

The Creator houses follow the same concepts: very nice exterior, but with bare interior, walled-up back side and no minifig. Newer sets have near-bare interior and a minifig. They are not perfect, though. Some of the alternate builds are rather weak. Some of the alternate builds are also not in minifig scale.

The Creator houses have the best price-per-piece ratio after the Modular Buildings. But that is misleading, because they have very few rare parts compared to normal sets. Regardless, they make for great brick sets — good for MOC'ing.

Model Town House (2007)

Model Town House

Product Shot

1,174 pieces. RRP US$69.99. Cheapest on BrickLink: US$210. This is too expensive for me to consider.

House (2007)

House

Product Shot

731 pieces. RRP US$49.99. Cheapest on BrickLink: US$90. It is still not too expensive, but do I really want it? This is not a must-have and I'm not a completionist.

Beach House (2008)

Beach House

Product Shot

522 pieces. RRP US$34.99. Cheapest on BrickLink: US$45.

The third build is smaller than minifig scale.

Not too bad, but yellow is very glaring.

Family Home (2009)

Family Home

Product Shot

976 pieces. RRP US$59.99. Cheapest on BrickLink: US$68.

It was still available in Singapore a few months back. At that time, I was still undecided whether to start or not.

The primary build looks very boxy. The third build is smaller than minifig scale.

Apple Tree House (2010)

Apple Tree House

Product Shot

539 pieces. $80 at Toy Station, $90 elsewhere. RRP US$44.99.

All 3 builds look equally good! Although the third build is slightly smaller than minifig scale. I'm tempted to get multiple sets.

The garage is awfully short and won't actually fit a car, though.

Log Cabin (2011)

Log Cabin

Product Shot

355 pieces. $60 at Toy Station, $70 elsewhere. RRP US$29.99.

Both the alternate builds are rather weak, IMO.

Lighthouse Island (2011)

Lighthouse Island

Product Shot

518 pieces. $70 at Toy Station, $80 elsewhere. $RRP US$39.99.

I love how the boats are so different in each build. Of the three builds, only the cafe will fit into my city concept. However, it is not that nice: the building is very small and the interior is almost bare.

Hillside House (2011)

Lighthouse Island

Product Shot

714 pieces. $120 at Toy Station, $140 elsewhere. RRP US$69.99.

Very expensive, but I think the 3 builds are all very well designed. Even the car is quite different! Again, I'm tempted to get multiple sets.

How do I feel about this series?

I love the houses very much! However, I will only consider the new releases on a case-by-case basis; they are not an automatic buy. Also, I doubt I will buy the discontinued houses. While they are nice, they are not must-haves for me — given my constrained budget, I'll rather buy other sets.

There are three things to do to fit the creator houses into the City theme: simplifying the structure, removing the back wall and adding interior!

Sets compatible with the City theme

hobby

Many themes are compatible with the City theme. The most obvious ones are the Creator (house) series, the Modular Building series and medieval civilian sets from Kingdom or other fantasy themes.

By using these sets, the city will look more varied. I will look at these sets one by one.

The most affordable City sets for now

hobby

The three most value-for-money City sets currently:

City House (2010)

City House

Product Shot

383 pieces. $59.90 at Toy Station. (Also at TRU, if you can find it.) I don't know if this set ever sold at its RRP or not. RRP US$39.99.

LEGO City Truck (2010)

LEGO City Truck

Product Shot

278 pieces. $39.90 at Toy Station. And elsewhere, perhaps? This could be the price mandated by LEGO Singapore. RRP US$34.99.

Despite the attractive price, I didn't get this because it doesn't fit into my city concept. And the glaring yellow. :-O

City Mini-Figure Collection (2009)

City Mini-Figure Collection

Product Shot

60 pieces. $10.90 at ToysHunt. (Toy Station sells it for $14.50.) RRP US$9.99.

I like this set because of the civilians. The City theme is overflowing with police, firemen, robbers and other service workers. I won't buy multiple of this set, though. I'll wait for future civilian sets for even more variety.

Estimating the value of sub-sets

hobby

As I mentioned before, there are several sets that are just a collection of smaller sets — and are packed as such; they are in their own self-contained bags.

Here, I try to reverse-engineer the pricing. I did not take rare parts into account. In reality, individual sets may sell for more or less depending on their desirability.

Bank & Money Transfer (2011)

Bank & Money Transfer

Product Shot

Item Price
Bank + 1 minifig$35 + $3
Van + 1 minifig$22 + $3
Policecar + motorbike + 2 minifigs$12 + $5
Total$80

405 pieces. $76 at Toy Station, $80 elsewhere. RRP US$49.99.

If I just want a second bank, it'll cost me $38 if I manage to sell off the other two sets. I don't really see people buying the van for $25 though, unless it has some desirable parts for MOC'ing.

Marina (2011)

Marina

Product Shot

Item Price
Cafe + 1 minifig$38 + $3
Coastguard watch tower + bridge + 1 minifig$37 + $3
Boat + windsurfer + 3 minifig$20 + $9
Total$110

294 pieces. $93 at Toy Station, $110 elsewhere. RRP US$49.99.

I'm only interested in the cafe, but at $41? Maybe I'll pass.

City Corner (2009)

City Corner

Product Shot

Item Price
Pizza shop + 1 minifig$41 + $3
Bus + 1 minifig$31 + $3
Bike shop + 2 minifigs$15 + $6
Bus stop + 1 minifig$8 + $3
Total$110

483 pieces. $96 at Toy Station, $110 elsewhere. RRP US$59.99.

The bus should be able to fetch a premium because LEGO has not made a bus since 1979!

If I want a second set, I'll keep just the bus and the bus stop. I like to have multiple identical buses and taxis. Otherwise, how can it be public transport?

Train Station (2010)

Train Station

Product Shot

Item Price
Platforms + overhead bridge$33
Station + 2 minifigs$16 + $6
Taxi + 2 minifigs$7 + $6
4x tracks$12
Total$80

361 pieces. $68 at Toy Station, $80 elsewhere. RRP US$49.99.

I want the taxi. In fact, I want two of them. Will I be able to sell the rest of the sets away? I think so, especially to train builders.

Spliting up a large LEGO set

hobby

The Public Transport Station (8404) is a TRU exclusive, so it is sold very expensively at S$169.90 (RRP US$99.99). It should be just a S$130 set based on my gut feeling.

Public Transport Station

Product Shot

It is a loose collection of transport-related sets (864 pieces). I'm not interested in all of them. Luckily, they come in several bags, so it is possible to sell them separately (as new sets). The question is, how to value them?

My guess:

Item Set price Objective price
Tram + 1 minifig$55$40
Bus + 1 minifig$50$35
Bus stop + yellow car + bicycle + 3 minifigs$25$23
Street sweeper + 1 minifig$15$12
Tram stop$15$10
Magazine stand$10$10
Total$170$130

The tram and the bus are the highlights of this set, so they should be able to command a premium. However, they are already marked up. I'll be happy to break even.

The sets I want are the street sweeper and the bus stop / car / bicycle.

I can keep the bus, even though it is in an ugly lime green. But if someone offers me $50, I'll sell it.

I don't want the tram, even though I think it looks nice. The only way I'll keep it is if I convert it to a motorized light-rail subway — which has been done. That'll require some serious money and time (sourcing for the parts)...

A look at one LEGO set

hobby

LEGO has the Bank & Money Transfer set (3661) for 2011. It is a medium-large set and has one building, a van, a car, a motorbike and four minifigs.

Bank & Money Transfer

Product Shot

The set's RRP is S$109.90, but everyone is selling it for S$79.90, except for Toy Station who sells it at S$75.90. At this price, it is pretty value for money — for LEGO anyway. If you still find it expensive, then LEGO is not for you. ;-)

This set is very typical of present-day LEGO sets: a collection of smaller self-contained sets, large pieces and oversized box.

There are four separate bags: two for each floor of the building, one for the van and one for the car/motorbike. They are independent of one another, so they could have been sold separately. It looks like they are put together to meet the price-point. If the building is sold separately at S$40, I bet it'll be quite popular.

(This leads to a strategy of selling unopened bags that you are not interested in. They are viewed mostly as new sets.)

There are also many large pieces and not many generic bricks. Large pieces means the construction is way too simple. Lack of generic bricks makes it harder to create an alternate design.

The actual building is just 12cm long x 15cm high x 6cm deep, but the box is about 50cm wide x 20cm high x 6cm deep. The oversized box is why shipping costs so much.

The building is also typical of City-theme buildings in that they are very shallow and have no back (to allow the interior to be accessed). I don't like the shallowness, but I do like the open back.

Conclusion

This is one of the more value-for-money sets. Get this set if you are only buying only one set! The inclusion of the police-n-thief element increases playability tremendously — for children anyway.

Best LEGO prices

hobby

Toy Station sells new LEGO sets at 15% discount from RRP (Recommended Retail Price) all the time — no membership and sales needed. This is the price to beat.

Many places offer 20% off off during sales periods, mostly during school holidays and the festive season. (Wait at your own risk, because some items may be sold out before you can get them.)

LEGO sets are half-price or cheaper in the US (at their RRP some more!), but shipping is very expensive due to the huge boxes and cancels out most of the savings. However, it is still worth a consideration from time to time.

Prices can vary by quite a lot for discontinued sets, so some research is necessary. In general, a LEGO set is discontinued after 1-2 years. LEGO almost never re-release the same set again, so the value of discontinued "new" (sealed) sets appreciate over time, sometimes sharply. Opened sets are much cheaper, but are usually still more expensive than RRP.

Regardless, BrickLink is a good place to go. It is the marketplace for all sorts of LEGO stuff, whether old or new, complete or individual parts. Anyone can be a buyer or seller. It is even better than eBay because it specializes in LEGO. There's not much bargain to be had (all the sellers are savvy collectors too :lol:), but the range of products is amazing.

A new hobby: collecting LEGO

hobby

I've wanted to start a LEGO collection since 2000. Eleven years later, I finally bought my first LEGO set in my life. :clap:

Back then, I would have gone for a medieval, fantasy or pirates theme, but today, I prefer the present-day city theme.

My goal is to build a varied multi-level city with both modern and old elements. My interest is on daily life, transport and houses. In time, I hope to create unique buildings and sets (what Lego'ers call MOC — My Own Creation).

I will take years to build my city because I will be very selective with what I buy. Even so, it's not going to be a cheap hobby...

Just who is paying your CPF interest?

finance

In Singapore, it is extremely common to utilize one's CPF to pay for the housing installment. Otherwise it is stuck until retirement age, which is pushed up time after time. All-in-all, you can use 19-23% of your monthly wage, capped at S$1k-1.2k.

There is one little clause that most people don't pay attention to:

If you sell your HDB flat when you are below the age of 55, you need to refund the principal amount you had earlier withdrawn for the purchase of the flat, including the accrued interest to your CPF account. This interest is the amount you would have earned, had the savings not been taken out.

Accrued interest.

Suppose you use $50k as downpayment from your CPF a/c. 2.5% for 15 years means the interest is $22.7k. When you sell your flat, you got to put it back into your CPF a/c. That's fine, because that's the interest you owe after all.

What I want to bring up is, who is paying the interest for these years?

Not the CPF board for sure.

Hint: when you sell your flat, be sure that it covers the accrued interest. Otherwise you are actually selling at a loss. (This is not a problem in a rising market, of course.)

What I really want to bring up is, it doesn't take much money to run the CPF board. The Singapore System never fails to amaze me.

Not all roses in Workers' Party

social

Eric Tan has quit Workers' Party (WP) because he wasn't chosen to be an NCMP. I would have been very disappointed if I were him too. But shouldn't he look at the big picture?

It shouldn't be the money, because an NCMP only gets S$1.8k, unlike an MP who gets $15k.

WP is planning for 2016, that's why it wants Gerald Giam (34 years old) to gain experience instead of Eric Tan (55 years old). GG also makes for a better impression than ET. If you compare them objectively, you'll also conclude that GG is the better choice. The only thing going for ET is his seniority (27 years in the party).

This saga tells us that although WP portrays a united front during the election, it is not truly "one-heart". There is internal politics, as always.

In 2006, James Gomez and Goh Meng Seng who contested in Aljunied GRC quit WP soon after the election too. These are people in WP's A team, and they leave so easily?

Step forward or back for GE 2016?

social

Workers' Party has achieved a breakthrough in 2011. Most people believe WP will do even better in 2016 when it challenges most of the east constituencies — the whole east of Singapore is pro-opposition at 40+%; no amount of gerrymandering can keep all of them safe.

While that is true, WP also has a big challenge in 2016: it must be able to keep Aljunied GRC first.

History lesson: the opposition won four seats in 1992. It was a promising start. But it lost two of them in 1997.

WP still needs to field a strong team in Aljunied GRC. To replicate the same victory in other GRCs, they need to attract new top talents to be in the other teams. Chen Show Mao is an exceptional candidate, but Pritam Singh holds his own too. There is talent to be found within Singapore itself.

Will PAP field a weak team or a strong team? A strong team means a Minister. But who will take the risk? Ex-Minister George Yeo said that he'll retire, but never say never. A weak team means to rely entirely on PAP's branding. In that case, PAP will only be able to take it back if WP screwed up in the 5 years. (Opposition wards often hold if the MPs do a good job.)

I look forward to 2016. :-D

Your mandate; you asked for it

social
GuessActual
Hougang SMC42%35.19%
Aljunied GRC46%45.29%
Potong Pasir SMC48%50.36%
Holland-Bukit Timah GRC53%60.1%
Bishan-Toa Payoh GRC55%56.94%
Tampines GRC57%57.22%
Ang Mo Kio GRC58%69.3%
Marine Parade GRC60%56.65%
East Coast GRC62%54.83%
Sembawang GRC63%63.89%

An overall mandate of 60.1%.

There are several things that are very clear this year:

  • SDP still has an image problem. They have the lowest scores.
  • Mr Chaim has no successors. Either he has no one to inherit Potong Pasir or he still wants to keep it "in the family". It is quite well-known that he's a one-man-show.
  • NSP (Mr Goh Meng Seng) used the unworkable conventional strategy of spreading their good people around. Unfortunately, his best is (much) worse than PAP's best. WP pit their best against PAP's mid-class and it was already hard fought. This strategy is well-known in Chinese history.
  • Brand is very important. Desmond Lim of SDA insisted on contesting Punggol East SMC because he claimed he worked the ground for the past 3 years. He lost to "Parachuter" Lee Li Lian of Workers' Party. Lost is an understatement. He was wiped out: 4.45% (SDA) vs 41.02% (WP) vs 54.53% (PAP). Moral of the story: the opposition must avoid 3-corner fights.
  • Most ministers who made mistakes in the past 5 years got a pretty low mandate. If coupled with a strong opposition team, they should fall. By right Vivian Balakrishnan should fall into this category, but well, SDP has an image problem.
  • A very poor candidate can pull down even the veteran SM Goh. And that's with just one star opposition candidate. If they have a star team there... It is hard to say if PAP won't repeat this mistake because their new candidates are always very unimpressive.

The Prime Minister must be very happy. He got one of the highest mandates at 69.3%. I'm quite surprised, actually. I can only say Reform Party ran a botched campaign. If Workers' Party put the same 2006 "suicide" team there, I'm sure PM Lee would have gotten less than 60%. (But most of them have moved to bigger games; LTK is a long-term planner.)

The weakest link

social

My speculation, purely a figment of my imagination:

Hougang SMCDesmond Choo42%
Aljunied GRCGeorge Yeo (Foreign Minister), Lim Hwee Hua (PMO)46%
Potong Pasir SMCSitoh Yih Pin48%
Holland-Bukit Timah GRCVivian Balakrishnan (Minister for CDYS)53%
Bishan-Toa Payoh GRCWong Kan Seng (Deputy PM)55%
Tampines GRCMah Bow Tan (Minister for ND)57%
Ang Mo Kio GRCLee Hsien Loong (PM)58%
Marine Parade GRCGoh Chok Tong (SM)60%
East Coast GRCLim Swee Say (PMO), Raymond Lim (Transport Minister)62%
Sembawang GRCKhaw Boon Wan (Minister of Health)63%

IMO, Mr Mah is the weakest minister. He invokes the wrath of every Singaporean under 35, because they are unable to afford his "still-affordable" public housing in the past 4 years. In the rallies, the crowd always have strong reactions whenever he is mentioned. However, his job is relatively safe because he faces weak opponents. It's like NSP does not believe they could unseat him.

Wong Kan Seng is also rather weak, due to the several security lapses under his watch, as well as his inability to apologize in public. However, I don't think that is sufficient to sink him. He caused national embarrassment, but not anger.

Overall, I feel PAP will get a mandate of 55-59%.

I believe PAP will still retain most seats. Despite "widespread" unhappiness, many people will still vote for PAP for one reason — fear. Many people perceive that voting against the ruling party will affect their career, scholarship, funding, Government contracts or their children's chance of getting into a good school.

Ordinarily, I'll say they are entitled to their fear. But this is no ordinary time. Do they think they will have a career, get scholarship and other stuff by voting for PAP? Hello, PAP has already stated they are going to import another 900,000 foreigners!

Thus, I have no sympathy for these people, because, "Every nation has the government it deserves".

The wrong answer

social

News: Length of loan is not the issue: Mah Bow Tan

Date: 1 May 2011. Source: Today.

It is not the length of the loan but the percentage of monthly income repayable to the housing loan that matters, said Minister for National Development Mah Bow Tan in response to an Opposition point that paying for a HDB flat on a 30-year loan makes it unaffordable.

The length of the loan varies and is up to the home buyer, Mr Mah said. They are free to take up 30-year loans, or even 25- or 20-year loans, he added.

Mr Mah is in an unenviable position. He has to either lie or look stupid.

It is fine to pay 25% of your pay for 30 years — for some definition of affordability. But it is not fine when it is also your retirement money.

Mr Mah also conveniently forgot to mention that when people upgrade, they get deeper into debt and their loan resets to another 30-year tenture.

In addition to tenture, it is also important to note that the age of the person when he finishes paying for his loan. Whether a person is 25 or 35 years old, he should target to finish paying for his loan in 20 years or by 50 years old. (IMO, this is already sub-optimal.)

If you have to pay for housing your entire working life, I think renting is a better word.

Why flats are affordable according to Mr Mah

social

Everyone feels HDB flats are expensive. Resale flats are subjected to market demand-and-supply. Given the fixed supply and high demand, it is no wonder the prices shoot into the sky.

But new HDB flats are also expensive. This is because HDB pegs them to resale prices, then it gives a so-called market subsidy.

The raging question is, can a young couple afford a new HDB flat to start their lives together? This is a very important question because it determines how early they marry and have kids.

The general feeling is no. Mr Mah Bow Tan (MBT) says yes and he gave this answer:

Housing not a make-or-break issue at GE: Mah Bow Tan

Date: 25 April 2011. Source: Today.

The Government understands Singaporeans' concerns about the recent rise in housing prices, he said, but unlike other countries, Singapore has more policies and programmes in place to deal with the issue. He cited housing grants, increased supply of Build-to-Order flats and market cooling measures to address concerns on housing prices.

As a result of these efforts, eight in 10 couples who bought new flats last year used 25 per cent or less of their salaries to service their monthly mortgages, meaning that they pay little or no cash, he said.

Mr Mah cited an example of how a young couple below 30 and earning a combined income of S$4,000 can pay the 5 per cent downpayment for a new four-room HDB flat with no cash after working for half a year to build up their CPF, and pay less than S$50 for their monthly mortgage payment.

He told reporters: "You would get a flat with zero deposit. Now, how many countries in the world can say that? How many housing ministers in the world can say what I have just said?"

I have so much to say about the HDB policies that he mentioned, but today I'll just focus on the example.

First, let's calculate at face value. CPF OA after 6 months is $5.5k. A naive calculation may lead you to think that a 4-room flat costs just $110k. Since even a new 3-room flat costs $160k, does that mean MBT is lying?

No, he is not, but he also did not give you the full picture.

Enter the Additional Housing Grant (AHG) of $15,000. Now the couple can afford a much more expensive flat.

Another netizen has calculated that the couple can "afford" a flat up to $300k without any upfront cash — including legal fees and stamp duty. The story doesn't end there:

  • What about the other 5% downpayment? Well, they pay it later when they collect their keys.
  • Do they really pay just $50 mortgage payment? Well, MBT is talking about paying $50 in cash on top of their CPF payment.
  • They have to service the loan for 30 years. Isn't CPF meant for retirement?

So MBT is right. But I'm sure you are feeling deceived from the sleight-of-hand.

And this is true of all PAP's statistics. They only show you the tip of the iceberg. Be woe to the person who doesn't realize the hidden part of it.

Perception vs reality

social

SDP has very poor reputation in Singapore due to the local media, but also in no small part due to Dr Chee himself. But is Dr Chee the mad man the local media portrays him to be?

In 1996, Dr Chee was sued over comments he made about health care costs. In 1997, he was in the spotlight after he asked about Singapore's financial assistance to Indonesia. Then in 2001, he was sued again when he asked Goh Chok Tong (GCT) about the CPF during the elections: "where is our money?"

At that time, Dr Chee already has a poor reputation because he "threw" Chiam See Tong (CST) out of SDP in 1993. At that time, everyone saw CST as the opposition role-model.

So when Dr Chee made all those comments, we laughed him off and called him a mad man. Sadly, the joke is on us. The truth is, healthcare is expensive, CPF is withheld longer and longer and there is no financial accountability.

This election, a few "heavyweights" joined his team:

  • Dr Ang Yong Guan: ex-grassroots leader
  • Mr Tan Jee Say: former Principal Private Secretary to Senior Minister GCT
  • James Gomez: contested in Aljunied GRC in 2006
  • Vincent Wijeysingha: son of former Raffles Institution principal
  • Teo Soh Lung: arrested and imprisoned without trial under ISD in 1987

It makes one wonder. If Dr Chee has such poor reputation, why would these people throw in their lot with him?

The importance of speaking up

social

First they came for my CPF,
and I didn't speak up because I'm still young and it doesn't affect me.

Then they raised the retirement age,
and I didn't speak up because I'm still young and it doesn't affect me.

Then they increased the HDB flat prices,
and I didn't speak up because I already have a HDB flat and it doesn't affect me.

Then they implemented means-testing,
and I didn't speak up because I am healthy and it doesn't affect me.

Then they came for my job and increased the cost of living
and I realized I have to speak up — or shall never again.

What makes a Singaporean?

social

Legally, the pink IC means you are a Singaporean. But native Singaporeans don't think that way.

In 2005, a British citizen surrendered to the Singapore authorities for evading his NS (National Service) almost 30 years ago. He got away with a "slap on the wrist" — with a fine not exceeding $5k. It helps that he is a world-class pianist now.

There was somewhat of an uproar, especially among the menfolk. The common sentiment: "$5k can slam NS? I also want!"

The more rational ones had to point out you also have to give up your citizenship and stay away for 30 years.

Fast forward to 2011. An overseas-based Singaporean is coming back to contribute to the nation. This is what Dr Ng Eng Hen of PAP, Minister of Education, asks of him:

From available information, Mr Chen has spent 40 of his 50 years out of Singapore. His entire career has been as a corporate lawyer in the United States and China. His wife and children do not live in Singapore.

He now turns up and asks Singaporeans to elect him as a Member of Parliament. Surely, voters have a right to know from the Workers' Party if such a candidate can identify with the aspirations of Singaporeans and has a stake in our future?

These questions should not be brushed aside and deserve a direct answer.

Mr Chen is a credible threat to PAP and they will spare no effort to dig up any dirt on him. List of fallen threats: Francis Seow, JBJ, TLH and CSJ. What PAP cannot destroy before the election, they will do so after it — these people are fixed after the elections with extremely flimsy excuses.

Luckily, Mr Chen is in a better position than his predecessors because he will be able to afford the multi-million fine. :lol:

If you ask the average native male Singaporean, they'll say they identify with Mr Chen, for one simple reason: he has done his NS.

Some small-minded people say he became a Singaporean to qualify for a scholarship. But really, even if that is his motive, he has paid for it through his NS and he is a Singaporean.

In the eyes of the menfolk, NS is a ritual that quickly distinguishes between a "true" Singaporean and not. (Trust me, no sane 18-years old will volunteer to give up 2.5 years of his youth.)

Power in your hands

social

Toute nation a le gouvernement qu’elle merite

Joseph de Maistre, 1811

Or if you prefer in English: "Every nation has the government it deserves".

People think they cannot make a difference. And they do not dare to make a difference. And hence there will not be any difference.

Every five years, people are given a choice whether they want the status quo or whether they have enough.

Don't waste it, because, "toute nation a le gouvernement qulle merite".

PSX memory timing: data

programming

Theory

The PSX has a 1 kB D-cache. It also has a 4-word write buffer.

Read results

Mem Read Test PCSX-R PxDn New PSX
Cached region 1377 1002 1127 1144
Uncached region 1377 1001 1126 1143
Scratchpad 1377 501 500
MDEC 0 1377 1001 876 876
BIOS 1377 1001 3629 3627
BIOS (byte) 1377 1001 1378 1376

The PSX uses its 1 kB D-cache to implement the scratchpad. As a result, there is no D-cache at all and all memory accesses take 4 clock cycles.

Memory read is slower than expected at 5 clock cycles (could be due to 1-wait state). Surprisingly, h/w read takes just 3 clock cycles. The BIOS takes 7 cycles for byte read and 25 clock cycles for word read. It is likely to be a 8-bit memory chip.

Write results

Mem Write Test PCSX-R PxDn New PSX
Cached region 1127 784 721 501
Uncached region 1127 782 720 501
Scratchpad 1127 501 501
MDEC 0 1127 782 720 500
BIOS 1127 782 8634 8613
BIOS (byte) 1127 782 2253 2247

Mem write is a surprise. I did not fill the write-buf fast enough, that is why writes take only 1 clock cycle each.

Note that even the New PxDn does not emulate the write-buf. It can be done, but I don't know if it is worth the effort to do so.

Code

Mem read code:

    li t0, NUM_TEST_ITERATIONS

read_mem_test_loop:
    lw t1, (a0)
    nop
    bne t0, r0, read_mem_test_loop
    addi t0, t0, -1

Mem write code:

    li t0, NUM_TEST_ITERATIONS

write_mem_test_loop:
    sw t1, (a0)
    nop
    bne t0, r0, write_mem_test_loop
    addi t0, t0, -1

For byte tests, just replace lw/sw with lb/sb.

Note: the code is loaded to the cache before the actual run.

PSX memory timing: code

programming

Theory

The PSX has a 4 kB I-cache. If the instruction is in the I-cache, it takes just 1 clock cycle to execute. The cache hit ratio is 95%, so most code run at full speed. It takes 4-7 cycles to fill the cache line on a cache miss (read timing 4-1-1-1). Uncached code always takes 5 clock cycles to execute.

Test setup

I set up root counter 2 to count at 1/8 system clock. Each count is thus 8 clock cycles.

I also ensure the code is in the cache before the actual run.

Results

Test PCSX-R PxDn New PSX
Empty loop 501 251 250
2-NOP loop 1001 502 501
7-NOP loop 2253 1128 1126
Uncached empty loop 501 1253 1503 1526
Uncached 2-NOP loop 1001 2504 3004 3050
Uncached 7-NOP loop 2253 x 6758 6861

Analysis

Cached code takes 1 clock cycle per instruction. Uncached code takes 6. (6.1 to be exact. Where does the 0.1 come from?)

Either the theory is wrong, or the memory has 1-wait state.

Code

The empty loop:

    li t0, NUM_TEST_ITERATIONS

empty_loop_test_loop:
    bne t0, r0, empty_loop_test_loop
    addi t0, t0, -1

The 2-NOP loop:

    li t0, NUM_TEST_ITERATIONS

nop2_test_loop:
    nop
    nop

    bne t0, r0, nop2_test_loop
    addi t0, t0, -1

The 7-NOP code:

    li t0, NUM_TEST_ITERATIONS

nop7_test_loop:
    nop
    nop
    nop
    nop
    nop
    nop
    nop

    bne t0, r0, nop7_test_loop
    addi t0, t0, -1

MIPS R3000A branch-in-branch, vindicated

programming

This was one of my test cases after I simplified the branch handling:

org $80010000

    li r1, 0
    li r2, 0

    beq r0, r0, next
    dw $10000004	; beq r0, r0, next2 (note: intentional miss)
    ori r2, r2, $0001

next:
    ori r1, r1, $0001	; we branch to next2 (ofs + 16) from here
    ori r2, r2, $0002
    ori r2, r2, $0004

next2:
    ori r2, r2, $0008
    ori r1, r1, $0002	; and end up here

; End condition:
; r1 = $0003
; r2 = 0

The problem is, PCSX-R gave r1 = $0003 and r2 = $000c.

Which is right? It depends whether PC is pointing to the BDS or at next when the branch-in-branch is executing.

Thanks to others on the Internet who executed this test code on the real PSX, we now know the answer: my program is correct and PCSX-R is wrong.

Yeah! (I am happy because I modelled the CPU behaviour correctly!) :clap:

I was quite sure I was wrong because I read a pretty trustworthy paper (Enhanced branch delay slot handling with single exception program counter) [patent 5,774,709] that implied PC is pointing to the branch-in-branch instruction.

This is a valuable lesson: always test on the real hardware.

Simplifying PCSX branch handling

programming

PCSX-R has a lot of code to handle branches. It needs to:

  • handle Branch Delay Slot (BDS)
  • handle load in BDS (possible data hazard)
  • handle branch in BDS
  • handle events

It is possible to simplify the branch code by using nextPc.

The core instruction execution function:

static void execInstr(void) {
    psxRegs.code = psxMemReadCode(psxRegs.pc);
    
    psxRegs.pc = psxRegs.nextPc;
    psxRegs.nextPc += sizeof(uint32_t);
    ++psxRegs.cycle;

    (*instrGrpBSC[_Op_]) ();
    }

Note how we assign psxRegs.nextPc to psxRegs.pc instead of incrementing psxRegs.pc directly.

The branch function becomes as simple as this:

static void doBranch(uint32_t tgtPc) {
    psxRegs.nextPc = tgtPc;
    }

We now handle both BDS and branch in BDS transparently!

We need a few more changes to make it work.

Load Delay Slot

We still need to handle the load delay slot. We use a new function since we can't use doBranch() now.

This is how instrLW() looks like:

static void instrLW(void) {
    uint32_t v;
    
    if(handleLoadDelay())
        return;
                
    v = psxMemRead32(_oB_);
                    
    if(_Rt_ != 0)
        _rRt_ = v;
    }

handleLoadDelay() is very similar to the existing function, but simpler because it already knows the current instruction is a load instruction.

static bool handleLoadDelay(void) {
    if(isLoadDelaySlotFlag)
        return false;
            
    switch(psxCpuGetLoadDelayType(_Rt_, psxMemPeekCode(psxRegs.pc))) {
    case DELAY_LOAD_NONE:
    case DELAY_LOAD_W:
    default:
        return false;

    case DELAY_LOAD_RW:
        delayReadWrite(psxRegs.pc);
        return true;
                                                        
    case DELAY_LOAD_R:
        delayRead(_Rt_, psxRegs.pc);
        return true;
    }
    }

delayReadWrite() and delayRead() will set and clear isLoadDelaySlotFlag. (It is actually the existing branchFlag variable.)

This will work transparently for load in BDS, because psxRegs.pc is pointing to the branch target in the BDS.

Setting PC

We cannot just assign to psxRegs.pc anymore. We need to update psxRegs.nextPc as well. It is easy to do a global search-and-replace. For example, this code:

psxRegs.pc = 0xbfc00180;

becomes

PSX_REG_SET_PC(0xbfc00180);

PSX_REG_SET_PC() is defined as:

#define PSX_REG_SET_PC(newPc)\
    do {\
        psxRegs.pc = (newPc);\
        psxRegs.nextPc = psxRegs.pc + sizeof(uint32_t);\
    } while(false)

Event handling

Now that we have simplified the branch handling to a non-event, where should we put the event handling code?

Answer: we can now execute code until the next event, which is how most other emulators work.

static void execSteppedInf(void) {
    for(;;) {
        uint_t numCyclesToEvent = psxEventGetFirstTgtCycle() - psxRegs.cycle;

        if(numCyclesToEvent > CHECK_EVENT_CYCLES)
            numCyclesToEvent = CHECK_EVENT_CYCLES;

        execByCycles(numCyclesToEvent);

        psxEventHandle();
        psxIntrTrigger();
        }
    }

static void execByCycles(uint_t numCycles) {
    ulong_t tgtCycle = psxRegs.cycle + numCycles;

    while(psxRegs.cycle < tgtCycle)
        execInstr();
    }

As its name imply, psxEventGetFirstTgtCycle() returns the cycle of the first event (DMA, interrupt or root counter).

The code is not just cleaner, but the interpreter is also faster because the event checking frequency is reduced from 1-in-10 (typical branch occurrence) to 1-in-100 or more. We can even make it adaptive if we want — by increasing the cycles when there are no events.

Exceptions

There is one last thing to do: exceptions. We need to handle exceptions in BDS correctly. Previously, we can use branchFlag:

psxHandleException(0x0020, branchFlag);

We need to use another method now:

psxHandleException(0x0020, PSX_IS_IN_BDS);

PSX_IS_IN_BDS is defined as:

#define PSX_IS_IN_BDS\
    (psxRegs.pc + sizeof(uint32_t) != psxRegs.nextPc)

Without this, the interpreter will run fine for a couple of seconds until the first exception occurs in the BDS with a non-trivial instruction, then it'll go haywire.

To sum up

Using nextPc simplifies the code because it is closer to how the MIPS 3000A processor works.

Will be pumping SPC from now

transport

I'm pumping ESSO/ExxonMobil due to convenience. With my speedpass, I just pump and go, and the bill is deducted from my bank a/c through GIRO.

I believe I get 10% discount. :lol:

However, a little more savings can be worth a little inconvenience. RON92 petrol is now above S$2 before discount. That's a historical high.

SPC has 10% discount for members, 5% discount + 3% rebate for a POSB Everyday Card holder. It has one of the best discounts. (This is a limited time offer, though.)

Plus, there is a SPC station right across my home.

I'm going to pump SPC from now on.

Time to conserve energy

Once again, electricity charges are going up, this time by 6.1%. There is no better motivation to be green than to save money. :lol:

Some data from SP Services themselves:

YearMin (Cents/kWh)Max
201124.10 (q1)25.58 (q2)
201022.87 (q1)24.13 (q3)
200918.03 (q2)22.93 (q1)
200822.62 (q1)30.45 (q4)
200718.88 (q2)21.38 (q4)
200620.49 (q2)21.64 (q4)
200516.06 (q2)19.57 (q4)
200415.44 (q1)16.35 (q3)
200315.24 (q1)17.81 (q2)

15 cents/kWh is about as cheap as electricity will get in Singapore. That was when oil was ~US$35.

I use ~100 kWh per month. That means my electricity bill has gone up by S$5 over the past five years.

Whiter than white

The PAP New Faces received "unexpected" overwhelming negative online comments.

Maybe that's why PAP candidates are so often "whiter than white". It's because any dirt or little "scandal" can be magnified.

I'm amused.