tungwaiyip.info

home

about me

links

Blog

< June 2012 >
SuMoTuWeThFrSa
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930

past articles »

Click for San Francisco, California Forecast

San Francisco, USA

 

Repair Rotten Stairs

I have spent my Sunday repairing a rotten step in my home. Here is what you do:

  1. Unscrew the rotten board. Got stuck.
  2. Search the Internet to find out how to remove stuck screws from rotten deck. Learn all about what the origin contractor has done wrong.
  3. Using a variety of ways, including just pull the board with the screw still in it since it is rotten anyway, to remove the board.
  4. Check for dry rot damages. Found out it is worst than you thought.
  5. Remove rotten wood with putty knife. Apply wood filler.
  6. While waiting for the wood filter to dry, cut the replacement board.
Rotten Stairs

So I am about three quarter there. I still have to buy more chemical tomorrow to seal the wood. Let's hope the replaced board can last a while. By the way I learned a lot from the Ron Hazelton's online video How to Repair Dry Rot in Wood.

2012.06.24 comments

 

Happy Meal

McDonalds

We paid $33 adult fare for the ferry ride to Discovery Bay, only to find ourselves dining in the McDonald's there. We even feed our baby McDonald's food. Here is the photographic evidence of bad parenting.

2012.06.13 [] - comments

 

Python Whitespace Misconception

Whitespace is significant in Python. This uncommon syntax rule is one of the refrain of many non-Python programmers about Python. Given most computer languages since Fortran has adopted free layout syntax, this feel like an objectionable design.

Now that I think of it, I find this mostly a problem of wrong framing. The term "whitespace" has already embedded the meaning of unimportant filler. In this sense "significant whitespace" sounds like a problem. Actually the right way to describe it is that Python uses indentation to determine the block structure. Rather than feeling wrong, this is lot more likely to evoke an "aha" reaction from non-Python programmers. Of course it makes a lot sense for the indentation to follow the block structure. I can hardly find any legitimate case for those two to differ.

Austere programmers may notice that there are two way to indicate block structure in main stream languages, by using language construct like "begin" and "end" and by laying out the code using indentation. Whenever there are two ways to do express one thing there will be problem of inconsistency. This extra degree of freedom can get you into trouble sometimes. One of the most nasty class of programming bug is dangling else. It is the case in free layout language when the apparent block structure is different from the actual block structure. Dangling else is not possible in Python. It is because the block structure is determined by the indentation.

2012.06.08 [] - comments

 

past articles »

 

BBC News

 

US-Iran crisis: Trump lashes out at 'ignorant and insulting' statement (25 Jun 2019)

 

Jeremy Hunt: Next UK PM must be trustworthy (25 Jun 2019)

 

'Climate apartheid' between rich and poor looms, UN expert warns (25 Jun 2019)

 

Stephanie Grisham: Melania Trump's top aide picked as press secretary (25 Jun 2019)

 

Naomi Campbell on diversity, colourism and Windrush (25 Jun 2019)

 

Israel-Palestinian conflict: Kushner says peace can bring prosperity (25 Jun 2019)

 

Mexico's top Caribbean beaches hit by seaweed infestation (25 Jun 2019)

 

Rhino release: Epic journey to freedom in Rwanda (25 Jun 2019)

 

Facebook to identify French hate speech suspects (25 Jun 2019)

 

Paris air pollution: French state blamed in landmark case (25 Jun 2019)

more »

 

SF Gate

 

A look back at Microsoft for lessons on antitrust (24 Jun 2019)

 

A message from the billionaires club: Tax us (24 Jun 2019)

 

Justices side with business, government in information fight (24 Jun 2019)

 

50 years later, the moon is still great for business (24 Jun 2019)

 

Supreme Court’s red-letter ruling for a 4-letter trademark (24 Jun 2019)

 

Best coffee makers for all tastes (23 Jun 2019)

more »


Site feed Updated: 2019-Jun-25 12:00