Tuesday, December 6. 2011Alternative Blog EnginesRecently, I’ve been hunting around for a blogging engine that can replace this ageing installation of Serendipity. The reason why I went with a full-blown PHP on-the-fly dynamically generated system was that there was no other way to provide interactivity to visitors to a blog. Stuff like commenting, link tracking, and page tracking were all impossible. However, with the rise of AJAX and JavaScript capabilities in browsers, what was once only possible on the server-side can now be delegated to the client-side. Rather than having the server operator foot the cost of running the whole infrastructure, part of it can be “outsourced” to visitors who are on similarly powerful computers. When dealing with a handful of visitors, the processing power requirements on the server-side is low and negligible. However, when you scale up to above 150 concurrent visitors, everything starts to crumble and the load becomes asymmetrical. Distributing or outsourcing part of the site generation to visitors can save a site when under heavy loads. With Google Analytics and Disqus, all dynamic parts of a site, once formally under the domain of dynamic server-side scripting, can now be offloaded to visitors with the use of asynchronous JavaScript. How it actually works is that the visitor’s browser fetches a static and light-weight HTML from my server, parses it and loads externally linked JavaScript files from these content providers, such as Google and Disqus, and then renders and attaches the output onto the static HTML site. This way, a once static HTML page has become dynamic, with much of the data outsourced to content providers, and rendering to visitors’ browsers. The upsides of managing static HTML is that it requires very little infrastructure to support and aggressive caching can be employed with the help of CDNs. If a server migration is needed, the static HTML files just need to be mirrored over and all will be well. So now, the problem shifts to that of generating these static HTML files. Surely they all require a unified look and hence have much markup in common, manually managing this across thousands of files will be a chore. A different kind of blogging engine is thus required. One that takes a set of templates, applies it consistently to all your posts, possibly written and formatted in markdown, and outputs to a directory where a web server can serve files from it verbatim. As part of my hunt, I’ve found 2 solutions that fit my requirements, one way or the other, with different and contrasting Pros and Cons. The easiest solution that I’ve found is Calepin.co. It basically takes a folder of markdown formatted posts and runs it through Pelican, a python-based static blog generator, and generates a usable blog at http://username.calepin.co. The upside is that it is easy to use and relies on Dropbox where you can access anywhere, including an iPad, with iA Writer. You blog will be generated when you click a button on the calepin site. The downside is that there is no custom CNAME (domain) support yet and there is no customisation available for the blog layout. You can’t even have a static “About” page on the blog! These two downsides (especially the first) are an absolute deal breaker for me. The next blogging engine that I’ve found is Octopress. It is basically a bunch of wrapper scripts and a curation of plugins around Jekyll—a no-frills static blog generator based on Ruby. It has all the features I need, such as CNAME (via heroku or github pages), static pages, but the downside is that it requires Ruby 1.9.2 to run. Mac OS X Lion and most other distributions come only with 1.8.x version of Ruby and getting the 1.9.x branch requires the installation of RVM, which in itself is easy but it makes ugly modifications to your shell environment. Fortunately, I can work-around this downside by generating my site in a virtualised environment with RVM and Ruby 1.9.2 installed. Given that Calepin is iterating at a rather high velocity, I’m considering holding back for a while before I decide to rule it out completely. On Twitter, the developer has indicated that CNAME is on his todo list, and he might be considering support for static pages. Nonetheless, if for whatever reason I have to rule-out Calepin, I will consider adopting its typeface and layout cues into Octopress and write a few wrapper scripts around it to accept input from a Dropbox directory. It looks to be an exciting time for an epic redesign for my various web-properties. Tuesday, November 1. 2011iMessageI’ve realised that iMessage will fall-back to SMS automatically when it detects that the recipient is unable to receive iMessages for whatever reason. This tiny feature alone one-ups Whatsapp. To the uninformed, iMessage was rolled out to all iOS devices that support iOS 5. This includes iPhone (3GS, 4, 4S), iPad, and iPod Touch. iMessage allows users to message one another via the Internet, free-of-charge, similar to the ubiquitous Whatsapp. It is deeply integrated into the SMS Messages app and will be in-use whenever the recipient of your message is on iOS 5 (and does not have iMessage disabled). You will be able to tell that you are sending an iMessage when the interface chrome is blueish in colour, and the placeholder text in the message area reads ‘iMessage’. While it is clear that a Text Message will be sent when the recipient does not have iMessage enabled, what about cases in which the user has iMessage enabled, but does not have access to the Internet at the moment you send an iMessage to him? In the case of Whatsapp, your message will be stored on the server, and the user notified only after he establishes connection to the internet. Well, as some will say, you could always fall-back to SMS when you noticed that he has not read your message after awhile, albeit manually. As for iMessage, it will automagically fall-back to SMS the moment the system detects that the recipient has not received the message via iMessage, after a few minutes. So, don’t worry about not being able to switch to SMS manually. You don’t have to—the system will do all the heavy lifting for you. Thursday, October 6. 2011Steven P. Jobs: 1955–2011Today, Steve Jobs left us. No words can be used to describe what he has done, or who he is, but one thing for sure, we can see his touch in the technology we use every day. He has propelled humanity forward, made things that were once inaccessible, accessible to everyone. He has raised the bar of possibility, turning hyperbole into reality. His passion for his vision brought him where few have gone. He has proven to us that passion trumps rationality. To live the life that your heart leads you, he did exactly that—nothing more, nothing less. As an inspiration to many of us, let’s not forget, this man changed the world—we should too, in our own ways. Let’s raise our glasses:
Posted by Ronald Ip
in Computers, Life, Thoughts
at
18:51
| Comments (0)
| Trackbacks (0)
| Top Exits (0)
Monday, September 26. 2011Text ManagementThere are two main applications that I use on my Mac to manage text input, depending on whether it’s free form text, or structured text such as code. For the former, I use iA Writer (available on both the Mac and the iPad). It is simply the best text editor ever created. It has the best display font, Nitti, which ensures clarity and at the same time, slows your reading such that you’ll read every character of what you’ve typed. In addition, the text size is sufficiently large which allows you to see your progress very visually. Most importantly, it comes with a very sparse distraction-free writing mode, called Focus Mode, that fades off all text except the current sentences, allows you to just type without any distractions. Given that this application has absolutely no configuration settings and the fact that it still feels right, it could be said that it is extremely well designed. Every design decision, including the background and cursor is meticulously engineered to look beautiful, and hence, less distracting. Here’s an introduction video: This is one of the few applications that have made writing a pleasure for me and I use it for all writing tasks. Word is just for formatting at the end. I hope the developers would release a trial version someday as the only way to fully appreciate its beauty is to use it. Another aspect of writing that I do often is coding. Programming languages are very structured and the least the code editor could do would be to enforce and aid in such syntactical rules. On the Mac, I’ve always used TextMate as it has awesome colour scheme support and bracket autofill. There are also bundles that are language specific that would allow you to run custom commands with a simple shortcut-keystroke. Lately, development of TextMate has almost stopped and the developer claimed that he is working on a successor version, TextMate 2. It’s been a few years since that announcement (2009) and nothing much has been said publicly after that. Thankfully, someone stepped up to the game and is now working on releasing another code editor that is similar enough to TextMate, but better. Sublime Text 2 is currently in beta, but in my currently regular use, it has performed reliably well. The best part of this is that this editor is cross-platform, available on the Mac, Windows, and Linux. As of this version, (build 2111), it has almost reached feature parity with other mature code editors. The only minor downside is that the code-editor configuration is driven by text-based JSON configuration files, no spanking clickable GUIs available, yet. For a code-editor to be decent, I have two requirements. First, it needs to automatically indent the text-insertion point whenever I insert a newline. If my text-insertion point is between two brackets (or curly braces), it should be smart enough to send the closing bracket to the next line, leaving my cursor right in the middle of both lines, indented by 1 tab-stop. Second, it needs to automatically close my brackets, while at the same time, prevent me from generating an additional closing bracket should I choose to type it in manually. Stepping in when I forget, stepping out of the way when I remember. Before I came across Sublime Text 2, I was on a lookout for a decent and usable code-editor for the Windows platform—Notepad++ is not decent. I’ve tried UltraEdit too, which supposedly is the most popular text editor, but it didn’t fit my requirements. With Sublime Text 2, I’m at ease. In both my code-editor and my Terminal.app, I use Ethan Schoonover’s Solarized colour scheme. It comes in both light and dark variants, and I personally prefer using the light variant. Here’s how it looks:
In Sublime Text 2, there’s also an option to customise the interface chrome so that it is less jarring and black. For that, I use the Soda Theme, light variant. Here’s how it looks:
As for the font, I use either Apple’s Menlo (if available) or André Berg’s Meslo (a modified version of Apple’s Menlo), “Meslo LG S” variant (on Windows especially). It is monospaced and it has great readability at most reasonable sizes (9–13 pt). Nitti Light would have been a great monospaced font if not for its exorbitant price. Happy writing and coding! Tuesday, September 20. 2011Monopoly (on the iPad)The game that we’ve all, at one point of our lives, played before—Monopoly. The version that I’ve grown up playing consists of paper bills, physical tokens, and a large physical board. The rules I played with then were “house rules”. Meaning, rules were decided by the people who organised the game. No one had bothered to read (or still kept) the instruction booklet that came with the game, no one knew better. Following this set of rules, I found the game pretty boring and much of the outcome was decided by the luck of your dice throw. Not much strategy could be employed. Apparently, that particular set of rules that I’ve always known Monopoly for was not in fact intended by the game author. A critical element of the Monopoly gameplay experience is the “Auction Sequence”. Outside of the iPad implementation of the game, I have never experienced it before, but it is part of the original Monopoly rules. Basically, whenever a player lands on an unowned property and decides to not buy it, the property is then put up to be auctioned off, with all players participating, including the one that passed the initial purchase opportunity with the bank! This “Auctioning” actually rebalances the gameplay a little as it gives players the opportunity to purchase/bid for the piece of property that they did not land on (by chance). By virtue of the fact that someone gave up the offer to buy a piece of property from the bank, everyone is given the opportunity to bid for it. This can actually become a strategic tool for all players involved. Another interesting aspect of the game, that is rarely practiced, is trading between players. Diplomacy and bargaining power comes into play here, which can actually spice the game up quite a bit. Imagine coming up with a contract to trade a piece of property for the right to not pay rent on the traded property? (I know it’s not really possible on the iPad, but it’s perfectly doable in real life!) The number of subtle lessons that one can grasp from a game of Monopoly, intended or otherwise, is hardly countable. In fact, I would think that this makes a good classroom exercise on Game Theory and Negotiation. Friday, September 9. 2011The Best Gmail Desktop ClientI’ve always wanted a functional email client for my Gmail account. The web-based interface is just slow and clunky, highly inefficient in when you need to jump right in, look for something, and get right back to work. Lion’s Mail.app isn’t of much help, as with any other mail client. Gmail’s IMAP access comes with some idiosyncrasies, where the delete function archives your mail, leaving you with tones of useless trash archived without a way to really delete them. For Gmail’s IMAP access to be usable, a email client needs to be designed with Gmail in mind to take advantage or workaround Gmail’s unorthodox IMAP implementation. Thankfully, such a solution now exists. I’ve been using Sparrow Mail for a few days and have been thoroughly impressed by the design and the attention to detail the developers have. Instead of the usual delete button in email clients, Sparrow comes with both Archive and Delete buttons, perfect for Gmail. The message list is also collapsable and expendable, allowing it to look like your Twitter client or act like a full-blown Mail.app. For US$9.99, I think it’s a good steal for a minimalistic and flexible Gmail desktop mail client. Best of all, it supports multiple (and non-Gmail) IMAP accounts, including ShortMail. Take a peak at Sparrow Tips and observe some cool things that it can do. However, do note that the Sparrow Lite (free) version available in the Mac App Store is a few versions behind and is not fully compatible with Lion. Sparrow Mail, on the other hand, works perfectly. Friday, September 2. 20119th AnniversaryLittle did I know, this domain that powers my site, blog, and my email addresses became 9 years old today. Time really flies and this is the perfect opportunity to recount the evolution of this domain name. I first registered iphoting.com when I was in secondary one, hoping to learn something about servers from my seniors in secondary school. Then, there were few domain name registrars available and I used Network Solutions, one of the most reputable but expensive around (there wasn’t much choice and I didn’t know better). It was expensive at almost US$20 a year. I didn’t have a credit-card then and had to borrow one from my parents. (E-commerce then was a relatively new and unproven to be safe concept and yearly renewals were a chore as I had to convince them all over that e-commerce is still safe.) Once I took custody of my domain name, I set up ZoneEdit to be my name server provider, as they were free and were highly recommended. Furthermore, they also supported Dynamic-DNS updating which was essential for my set up. In addition, they also offered to forward all my emails to my SingNet email address for free. I pointed the domain to a PIII 1GHz machine with 128 MB of RAM, running Windows ME, on my home’s SingNet 256 kbps broadband connection. Whenever I got disconnected or reconnected, a piece of software will detect the change in IP address and dutifully update ZoneEdit with my new IP address. After getting Apache 1.3 up and running, it marked the birth of my site. After that, I upgraded the hardware of that machine and migrated to Windows XP. This then allowed me to migrate to the 2.0 branch of Apache. Meanwhile, I also messed around with IIS and found that it is not a solution at all—insecure out-of-the-box. Eventually in 2003, I migrated the machine to Mandrake Linux 9.1 (now known as Mandriva) and that was the first taste I had in operating a production web server in a GNU/Linux environment. This migration from Windows to GNU/Linux instantly brought performance improvements. Apache on Linux, unlike its counterpart on Windows, does not use a pre spawned process model. Rather, the Linux version allows Apache to dynamically increase the number of processes based on load. This was also when I first started learning how to operate a mail server. The mail server that I chose to use was surprisingly difficult to install and set up—qmail. It used to be the most popular mail server, but fell out of favour over time due to the lack of new features and development. Nonetheless, it was and still is the most secure mail server available out there. However, a year after Google released Google Apps, I migrated my email services over to them as I had trouble handling SPAM. SpamAssassin was just not up to par despite my sincere efforts in tuning and training it. With Gmail, Google has successfully solved the problem of SPAM. I’ve never had the interest in visual design as I found Adobe Photoshop a very cumbersome and overcomplicated piece of software. I never had time nor the interest to figure out how to do anything, and where all the functions were hidden. The craze then was Flash, but I never messed with Flash enough that I could do more than just moving shapes around the stage. I spent most of the time in learning about systems administration. I was glad I made that choice. Command-line has never changed much since it was invented, only made more convenient. Sooner or later, one has to learn it, why not do it earlier when the mind still learns quickly? Later in 2006, the year that Apple started producing Intel-based MacBooks, I switched to a Mac. Although the first-generation Core Duo white MacBook that I’d bought had some teething first-generation problems, it was undeniable that Apple made something that I’d really liked. Not just something that I could use, but some that I had enjoyed using it. I was slowly being exposed to good and functional industrial design. Eventually in recent months, my interest in typography grew, and my appreciation for minimalist design became even stronger. This also led me to explore, to some degree, minimalist-responsive web design. As my site has been left in a state of disrepair for some time, I initially wanted to work on a revamp of my site during the summer holidays, in celebration its 9th anniversary, today. Unfortunately, somehow, I haven’t managed to deliver it. Given that it’s the 10th anniversary next year, I think I ought to finish the revamp by then. Meanwhile, now is the time to bring my skills in visual design up to a usable level. Wednesday, July 27. 2011Something is Royally Wrong in the State of SingaporeI don’t know about you, but every time I return from an overseas trip, I’ve got this very nagging and frustrating feeling that there’s really something very terribly wrong in this country called Singapore. Why in the world would people actually bother risking their lives protecting this place, this system of governance, is absolutely beyond my wildest imagination. I shall write about 2 problems that I’ve observed about thought about today—transportation and economy (in terms of manpower and production). Recently, a debate on our public transportation system was sparked by the news of requests for fare increases by the various public transportation companies. The Worker’s Party, Transport Minister Liu, Prime Minister Lee, and the National Solidarity Party (NSP) chimed in. As far as I can tell, the posture that the government has taken is to deny that there are any structural problems in the current system and to push all blame to rising costs caused by external factors, while strongly defending the status quo. If that’s the government’s position, it is clear that there will not be any changes as they have yet to acknowledge any underlying problems. While I’m not against the idea of raising fares per se, I am however against the idea of rising public transportation prices, coupled with falling service quality and standards. These factors should be mutually exclusive, not complementary. In my recent trip to Hong Kong (HK), I have noticed that HK similarly have private transportation operators, without the overcrowding and inefficiency we see here in Singapore. Their fares are not astronomically steeper and that the private operators aren’t making huge losses. So, why the difference? Having thought about it and experienced it, I believe the primary reason is the power of market forces, whereby the government takes a hands-off approach to managing public transport, somewhat similar to NSP’s proposal. Buses in HK are allowed to duplicate routes served by the MTR (HK’s Metro System), offering commuters a choice between taking a public buses and the trains. In the bus market, the transport department of the government plans and determines routes that bus operators can tender to operate. Rather than allowing a private bus company to monopolise the market, the Transport Department also operates a “public light bus” service (somewhat like a share taxi service) which offers a lower density ground transport option, possibly in direct competition or as a supplement to the standard bus routes operated by the private bus company. In essence, the government, through the Transport Department, is actually a player in the transportation market, without any form of nationalisation. This is actually a hybrid of both the WP’s and the NSP’s proposal in the management of the public transportation sector. Nobody has a monopoly, not even the government! As if there isn’t enough competition, about 18,000 taxis serve the whole of HK, most of which are privately owned. Taxi drivers that own their cabs do not have to pay rents to any taxi company and is free to run their own business according to the simple and standard fares set by the Transport Department. No nonsensical and complicated surcharges. Just a standard flag-down fare, two-tiered distance rate, toll-charges (if any) and baggages (carried in the boot, if any), 24 hours a day, 7 days a week, no variations. The free market manages the supply and demand automatically. The airport never has any cab shortages. The CBD always has cabs plying the streets. There is never a need price discriminate in order to manipulate the market demand. Why is Singapore the exception? Honestly, I have no qualms about not driving if the public transportation system can supersede it, when driving actually becomes a greater hassle. I believe many people would agree with me. The key to managing vehicle population cannot solely be based on the pricing mechanism (via COE and ERP), a more holistic approach is required by asking the right question—what does it take to get from one place to another. With the rights to own a car (COE) around the S$60,000 mark, it is clear that the COE system is causing more social problems (inflation, price-discrimination rather than needs-discrimination) than actually solving the vehicular-congestion problem. The reason why people need a car is because public transportation is horrendously underserving. The public transportation situation needs to be improved before the vehicular problem can be eased. As simple as that. Case in point: Berlin’s public transport is so developed and well-provisioned that there is hardly any traffic congestion even within the central business district during peak hours. The main problem with public transportation in Singapore is one of utility (and hence efficiency), not price or cost alone. If the government is poised to just address the symptoms with ineffective non-solutions, the mobility of Singaporeans (and by extension, the economy) is in serious trouble. Alex Au has a critique on the government’s approach to Singapore’s transportation. On subject of the economy, I have noticed that HK is similarly flooded with PRC mainlanders, compared to Singapore. They are everywhere that you can set your eyes to. The stunning difference, in the case of HK, is that the PRC mainlanders are tourists, not employees of any kind. All employment, ranging from construction to road sweeping, is held by locals who hold the HKID (permanent residency card). The only way to get a HKID is 1) to be born in HK, or 2) to have ordinarily resided in HK for a continuous period of no less than 7 years. What about Singapore? Don’t you find it strange that employment in the service industries (apart from the unglamorous jobs) are held by non-locals in Singapore? Under the pretext of keeping costs down, employers have been preferring non-locals in their hires as they are cheaper and do not come with National Service Reservist liability (more on that later). However, cheaper never equates to better. One of the greatest incentives to improving productivity and thus efficiency is the need to control cost, due to price (and quality) competition. By replacing employees with cheaper alternatives, operating costs can be reduced without the need to improve productivity, efficiency, or technology. In classical economics, the economic capacity of the country will not increase. How far can a country control its costs and grow its economy without actually improving its domestic economic capacity (by way of technology and productivity via education and the like) before the law of nature calls the bluff? With imported inflation (largely from the USA printing money), and domestic inflation (from flawed domestic policies, such as raising GST, CoE, and ERP), costs will still grow and the economy will eventually suffer due to a neglect in actual sustainable improvements. There’s only so much beating a dead horse can do. Singapore actually needs to bite the bullet and invest in raising a living and healthy horse. I believe this can explain why Singapore’s productivity is among the lowest in the world. A minimum wage may also help but that is another write-up for another day. What are the alternative solutions? Recently, Tan Jee Say, released a paper entitled, Creating Jobs and Enterprise in a New Singapore Economy – Ideas for Change, detailing a plan for Singapore’s economy. Consisting of three parts, namely 1) What’s wrong with the current Singapore growth model?; 2) A S$60 billion National Regeneration Plan; 3) Improving Singaporeans’ standard of living; The Online Citizen has a three-part summary of his 45-page long paper. Not surprisingly, the ruling party’s only rebuttals to the paper were red herrings. No substantial nor logically sound arguments against it were raised. I was hoping for a good, honest, and intellectual discourse, but all we got were mudslinging. There weren’t even any task-forces convened to look into his proposals and study their feasibilities, just an outright rejection of “we know the best”. Clearly, the ruling party is not interested in any alternative solutions (even if they could be meritious), all they want is their only solution. I actually have another proposal but I expect to be ignored. Firstly, Singapore should tighten the defence budget and instead, redirect the spending towards education. Our future lies in the younger generation, not propping-up defence machinery and promoting inefficiency at the expense of education! At the very least, Singapore’s defence budget (as a percentage of GDP) should not exceed that of other countries (technically still at war), like Taiwan and South Korea, and more importantly, should not be increasing annually. Secondly, National Service liability should be reduced to match countries that are technically still at war, such as Taiwan and South Korea. If the Taiwanese defence forces can manage with a 12-month (soon to be reduced to 4-month by 2014) long conscription, why is Singapore unable to do the same? Is our population a lot more stupid? Or is the defence force so inefficient that it needs 24 months to do what the Taiwanese can do in 4 months? With the male population relieved of 12–20 months of forced labour, the economy can actually employ these people productively. The argument that Singapore does not have enough people is moot, as the most productive part of the population is wasted unproductively through National Service. If productivity and efficiency is the issue, we can go by the Transport Minister’s logic and privatise our defence because ‘an entity that depends on Government funding and which operates on a cost-recovery basis, “would have little incentive to keep costs down”’ [1]. A good start would be to tighten the budget and limit the conscription duration. Thirdly, conscripted soldiers should be paid the market-rate (pay received by the professional “regulars”) for their contributions to the state. After all, civil servants and ministers are also paid salaries pegged to the market-rate so as to adequately compensate opportunity cost in joining public service. Unless of course, such market-rate salaries are for other reasons not publicly stated. Most certainly, the ruling party’s (and by extension, the government’s) stance is to keep the status quo and to reject any proposals, I don’t think we will see any policy changes anytime soon. This status quo is clearly troubling. Integrated Resorts to prop-up the GDP while our productivity is at an all time low, rejecting all suggestions to diversify stronger into the services industry, resisting calls to favour education over defence, denying that National Service is a drain on the nation’s economic productivity. Are these the policies that make Scandinavian countries so successful, or is Singapore in a race towards the bottom? My intuition tells me that Singapore is heading down a cliff. Even the “venerable” former Minister Mentor was said to worry that Singapore may not be able to last as long as other countries. For all you know, Singapore’s undoing could solely be attributed to the hands of his party, not the opposition as he so loves to claim. While the docile population isn’t interested in changing the status quo, the only logical step is to emigrate to a place where the government is sufficiently competent and isn’t in denial. Less fire-fighting, more pro-active. How can we expect any less from the world’s highest paid public office holders? It’ll be an insult to those who can do better for less.
(Page 1 of 80, totaling 640 entries)
» next page
|
MeGreetings to you, brain surgeon. Hi there. Welcome to the mind of an INT{J,P}, CDIS. I hope you can find your way around without getting lost. The pensieve is messy to the untrained eye. That's life isn't it. The fun part of life is to untangle the mess you've gotten yourself into. Follow my Twitter for time-sensitive or mundane updates, Tumblr for interesting links and quotes, Posterous and Flickr for photos, and this Blog for opinion and observations.
DownloadsQuicksearchPopular EntriesGoogle ReaderLicense |