Showing posts with label Other IT Stuff Worth Knowing. Show all posts
Showing posts with label Other IT Stuff Worth Knowing. Show all posts

Sunday, October 17, 2010

Links dump 11-Oct-2010 to 17-Oct-2010

The Seven Wastes of Software Development

This talks about reducing the costs of developing software from a process-driven perspective. The seven wastes highlighted are:

  1. Partially Done Work

  2. Extra Features

  3. Relearning

  4. Handoffs

  5. Delays

  6. Task Switching

  7. Defects


As a programming grunt, I can readily identify with the problems highlighted. Basically the series talks about delivering value to customers and eliminating overheads while delivering software to the customer. These overheads are what constantly pisses off programmers. Unchecked-in, untested codes. Lost of domain knowledge. Unexplainable design decisions. Customer requests not correctly captured. Multi-tasking. Long-standing bugs that are just uncovered. The list goes on.

This is a must read for all involved in the business of building software.

Replica Island

Replica Island is a free, open-source game for Android.  I'm interested in designing some simple games but I've no experience doing such things. This website is great as source codes are provided for people to use some reference. The developer notes are also enlightening, tracing the design decisions and problems faced by Google developer, Chris Pruett. One of the most important sources of knowledge on Android game development.

chmod -x chmod

A puzzler for system administrators, what can you do if you remove the execute permission for the program that changes file permissions, aka chmod? Assume a data center environment and no Internet connection. Very interesting solutions provided.
Partially Done Work

Extra Features

Relearning

Handoffs

Delays

Task Switching

DefectsPartially Done Work

Extra Features

Relearning

Handoffs

Delays

Task Switching

Defec

Saturday, April 24, 2010

Edsger W. Dijkstra's manuscripts

Edsger W. Dijkstra should be a familiar name to any computer science student, since one of the most important algorithms, Dijkstra's algorithm, is taught in graph theory.

Besides being a brilliant computer scientist, he's also written some articles regarding the computer science discipline and the computer industry. Click here for the link.

As such, most of what he covers are quite esoteric to those without any programming experience. Case in point, when I first started programming, I had to get used to the fact that in many languages, numbering starts at zero. Ie, the the first item in a list is indexed as 0, the second item is indexed as 1, and so on. An interesting view I discovered is that according to him, many mathematicians view computer science in poor light, and these are usually the poorer mathematicians.

My favourite piece is The Humble Programmer.

Some quotes:
On poor mathematicians:

I gave the puzzle as a sobering exercise to one of the staff members of the Department of Mathematics at my University, because he expressed the opinion that programming was easy. He violated the above rule and, being, apart from a pure, perhaps also a poor mathematician, he started to look for interesting, non-obvious properties

On poor mathematicians again:

Programming is one of the most difficult branches of applied mathematics; the poorer mathematicians had better remain pure mathematicians.

On learning:

We are all shaped by the tools we use, in particular: the formalisms we use shape our thinking habits, for better or for worse, and that means that we have to be very careful in the choice of what we learn and teach, for unlearning is not really possible.

On the Internet's impact on computer science:

No, I'm afraid that computer science has suffered from the popularity of the Internet. It has attracted an increasing —not to say: overwhelming!— number of students with very little scientific inclination and in research it has only strengthened the prevailing (and somewhat vulgar) obsession with speed and capacity.

On the power of machines:

Machine capacities now give us room galore for making a mess of it. Opportunities unlimited for fouling things up! Developing the austere intellectual discipline of keeping things sufficiently simple is in this environment a formidable challenge, both technically and educationally.

On society's expectations:

.....machines have become several orders of magnitude more powerful! To put it quite bluntly: as long as there were no machines, programming was no problem at all; when we had a few weak computers, programming became a mild problem, and now we have gigantic computers, programming had become an equally gigantic problem. In this sense the electronic industry has not solved a single problem, it has only created them, it has created the problem of using its products. To put it in another way: as the power of available machines grew by a factor of more than a thousand, society's ambition to apply these machines grew in proportion, and it was the poor programmer who found his job in this exploded field of tension between ends and means. The increased power of the hardware, together with the perhaps even more dramatic increase in its reliability, made solutions feasible that the programmer had not dared to dream about a few years before. And now, a few years later, he had to dream about them and, even worse, he had to transform such dreams into reality!

Saturday, July 25, 2009

Young programmers win big

Young programmers win big
Straints Times, July 20, 2009

TALK about starting young: Celine Chan, four, took on competitors far older in a national computer programming contest held here recently.

Celine and her sister, Charlene, eight, proved more than a match for the older competitors, trumping most of them handily in the contest, organised by the Information Technology Standards Committee which is supported by the Infocomm Development Authority (IDA).

Called XtremeApps, the competition required those taking part to program computer applications from scratch.

Armed with just the basics in the Squeak programming language, as well as encouragement - but no help - from mum and dad, the Chan sisters came up with an application called Health Fairies.

Two things interest me about this story. First, it is the age of the girls. I think it's quite hard to even understand what computer programming is about at the age of eight, let alone four. I didn't know what programming was when I was eight. Hmm..I don't think I've even played with a computer when I was eight. Anyway, even though tools are greatly simplifying programming, basic programming stuff like looping, conditionals, function calling, differences between classes and objects,etc can still easily overwhelm a young kid's mind. Then you also need to consider things like how the users interact with the program and the animation. You need a certain degree of logic and training to do programming. So I'm truly impressed that they can not only complete the project, but also beat the older competitors.

Second, it's interesting that they used Squeak to implement their project. Squeak is an implementation of the Smalltalk programming language. Most programmers I've talked to have never heard of Smalltalk, but I did manage to use the VisualWorks implementation  for about 3 years for work. Generally, you hear about the SAP, J2EE, .Net stuff powering the enterprise systems, so it is mildly surprising that Smalltalk used to be powering one of the biggest pay systems here. All those policies, payment stuff, bonuses, income tax, CPF computation in beautiful Smalltalk code. Funny how things appear though rose-tinted glasses. Anyway, we have difficulty recruiting people because most people consider Smalltalk to be an antiquated language. There really isn't a market for Smalltalk so no one wants to learn it, at least in Singapore. I'm a bit language agnostic (Ok, actually I prefer Java) so I didn't really think it mattered that much.

Saturday, June 20, 2009

Javascript performance tuning

Recently, I was working on a customer complaint that our application was slow when churning out reports. The worst case occurs when the user selects to generate a report for the time-span of 18 months, and the application will take about 3 minutes plus to generate the reports. Not being very familiar with Javascript and DOM, I googled and found the following resources which were extremely helpful.

Nicholas C. Zakas


Speed up your JavaScript, Part 1
Speed up your JavaScript, Part 2
Speed up your JavaScript, Part 3
Speed up your JavaScript, Part 4

Yahoo! Developer Network
Exceptional Performance

Dev Opera
Efficient JavaScript

IE Blog
IE + JavaScript Performance Recommendations - Part 1
IE+JavaScript Performance Recommendations Part 2: JavaScript Code Inefficiencies
IE+JScript Performance Recommendations Part 3: JavaScript Code Inefficiencies

In our app, I found that main bottleneck was that that there was simply too much DOM interaction when creating the report's table. Creating the report involved  creating TD and TR DOM elements and adding them to a table, and deciding when to break the page. After the report is created, some of the TD cells will be merged based on some criteria.

To tune the app, I cloned the TBODY node of the table, added all the child nodes into this cloned node, and replaced the original node. Then, I has to clone the node again for doing the breaking the pages and merging the cells. Basically, it involved multiple calls to cloning the nodes, creating new doc fragments, and replacing the original nodes. Basically, it seems like the code is doing a lot more work than the original. However, it is more than 60% percent faster after tuning!

As a side-note, it really is hell trying to work on a JSP that mixes scriptlets and badly-written Javascript. First, visually it's so messy it's disorientating. Second, sometimes you can't do profiling until you've refactored the Javascript, which is sometimes hopelessly entangled with the JSP scriptlets.  And some people always wonder why I'm rewriting so much code :/

Friday, April 25, 2008

Problem starting Netbeans 6.1 RC - resolved

Recently I've downloaded the Netbeans 6.1 RC1 and RC2 but I could not get it to work. After installing, I double-clicked on the startup icon but the program won't start. I've checked the Task Manager and most of the time the process would start but end immediately. Once the program managed to run but there was no window showing.

Did some googling but could not find out more about the issue. Now, I went into command prompt to try and see if I could start Netbeans from there. Here's the result:
C:\Program Files\NetBeans 6.1 RC2\bin>netbeans.exe

C:\Program Files\NetBeans 6.1 RC2\bin>nb.exe
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Rerunnig without "-client" option...
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Finally! So it has something to do with not enough memory being allocated for the VM. That's weird considering I have 2 gigs of RAM and 6.0.1 worked just fine with the same programs running in the background.

Anyway, I went into C:\Program Files\NetBeans 6.1 RC2\etc folder and opened up netbeans.conf. Then I changed "-J-XX:MaxPermSize=200m" to "-J-XX:MaxPermSize=128m" and it worked.

Monday, December 10, 2007

Switched webhosting to Godaddy

Finally switched my webhosting to Godaddy, it's value for money in terms of disk space, but the everything seems slower than Focushub.

Sunday, December 2, 2007

Sitex 2007

Needed to get some computer stuff, so hopped down to Sitex to pick up some bargains.

Some stuff I've gotten:

HP F4185 AIO printer, scanner, copier - $99 (Usual price is $149. Challenger members can get it at $139, so the savings at this show is quite significant)

Maxtor One Touch 3 - $130 (Not sure if I saved much on this buy)

Disk repairer for CD/DVDs - $25

Quite happy with my buys, but I spent quite some time installing the AIO. During the installation, the program got stuck, some error message about unsigned drivers and USB printing. Downloading the latest installation frpm the support website didn't help. In the end, what happened was that when I was prompted to plug in the USB cable, DON'T! Wait for the installation to complete, THEN plug in the USB cable.

Wednesday, November 21, 2007

Browsershots - web app to check your web page rendering

For most of us who do web pages, we don't have the luxury of a Common Operating Environment. That means, we're not in an intranet environment with standardised OS, browsers, etc. So there's the issue of making sure your webpage renders correctly, if at all, on different OSes and browsers. If resources such as hardware or software (like VMWare) are limited, a sensible solution would be to use Browsershots.

Basically it's a web app that lets you submit a website and check if it displays correctly on a variety of OSes and browsers. It will produce a bunch of screenshots which you can view and check if the rendering is correct.

test options

Hmm....this website doesn't quite pass the test.

test result

A note though. It might take some time to produce the results. If speed is an issue , you can consider getting priority processing.

Monday, October 22, 2007

SingTel mio TV promotion - not signing up after all

A few weeks ago, a SingTel mio TV promoter came to my place and told me I was eligible for a SingTel's mio TV promotion as I was a mio plan user. After he told me the benefits of the promotion, I proceeded to sign up. I distinctively remember that it was a six month free trial, but I had to subscribe to at least one channel. To me, that means I don't have to fork out a single cent for it, right?

First problem - loss of DSL signal from my modem/router

On the day of the installation, the tech guy came down to do the set up, but he noticed I has lost my connection. After checking with his colleague and some testing of the phone-line, he concluded that there was a misconfiguration at the back-end for the mio TV. This resulted in the loss of the DSL signal. He wrote down some stuff about the failed installation and ensured me I won't be charged for the follow-up installation as it's not my fault. He also told me the connection would be back up within the day and gave me a number to call in case it didn't .

As it turned out, the connected failed to resume and the no one picked up the number. The following day, I called again and was told to call the mio hotline. Conveniently, it was Sunday and there was no one to service me. The next day, I called up the hotline again and was told to call the mio TV hotline. The tech support wanted to step me through the troubleshooting process but I was at work. By the time I got home, I was finally reconnected.

Installation date - no arrangement

I was told that someone would contact me to arrange another date for installation. I waited a few days but no one contacted me. In the end, I called up the hotline again and asked them about it. I also told them I was disconnected for 3 days and was seeking some form of compensation. So after an exchange, I thought my problem was noted and waited for a reply. But there was none.

Checking for date of installation once more

After a few days, I called the hotline again and told them my problem once more. For some reason, the CSO told me they don't have a record of my previous call and was unaware of my problem. But she did finally manage to get someone from the installation team to contact me. That was after I found out it's not entirely free after all.

What kind of free are we talking about?

I was browsing through the hardwarezone forums when I came across the following exchange.

nWo:
Hi guys,

I tried to access the MIO webpage, but I had to fill up the information and select the channels? Seems to be that it will bill me for the full amount.

Will it be a free trial offer as you guys are having?

alanchia67:
you may have misunderstood the offer. the miotv promo is that they will not enforce the minimal billing amount. if you get miotv without DVR (digital video recording) and no pay-channel, it will be free.

I called up the CSO and she confirmed that the promotion is the waiver of the minimum charge for 6 months and some additional discount for mio plan users. What kind of "free" is that? I promptly told her I do not want mio TV after all. I hope I will get my compensation for 3 days of loss connectivity.

Sunday, October 14, 2007

Some things to note when upgrading to WordPress 2.3

Was upgrading to WP 2.3, got the following error message during the course of upgrading.
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 46080 bytes) in XXXXXXXXXXXXXXXXXXXXX/xxx.php on line 68

The solution is provided by riteshTilve here.

To quote him:
In cache.php, add the following code at the top in line 2 just after "<?php" :

ini_set("memory_limit","12M");

If even then it fails, try increasing the 12M to 20M.
After the upgrade runs successfully, you may remove that line or keep as it as you wish.

After that was solved, I tried to post something, but realized that the visual rich editor was missing. That is an easier problem to solve. Just hit the F5 key to refresh, and it should appear :)

The tricky thing is, somehow WordPress decided to delete my last post on CPF changes. It's a really weird bug, so I had to somehow recover it. I could grab it from a backup of the database before I updated WordPress. But I decided to use Google to try and retrieve a cached copy as it's faster. Thankfully it can be found there. So I copied the post in it's entirety and made some quick edits. Now it's back online again.

Sunday, August 19, 2007

Debugging a JSP compilation problem on Tomcat 6

I was doing some experimentation with Maven and Tomcat 6 when I hit this error.
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 8 in the generated java file
Only a type can be imported. net.project_00.interview.java.mock.web.SomeThingStupid resolves to a package

An error occurred at line: 17 in the jsp file: /interview-java-mock-web/index2.jsp
SomeThingStupid cannot be resolved
14:
15: <%=new Date()%>
16: <%=new GregorianCalendar()%>
17: <%=SomeThingStupid.getString() %>
18: </body>
19: </html>

Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
........... (rest of stacktrace)

Steps taken to debug the problem

Now, it appears to me that the error message is telling me that net.project_00.interview.java.mock.web.SomeThingStupid is not a type, but a package. I'm very sure that this is not the case after checking my code and package. Eclipse also does not give me this error when I do the import of SomeThingStupid . Conversely, when I import a package like java.util, Eclipse does give me the error.

Then I went to check that my WEB-INF\classes folder in my web-app's folder in Tomcat contained the class in the correct package. It did.

Not sure what's going on, I went to look for the generated Java class for the problematic JSP in $CATALINA_HOME\work\Catalina\localhost. I looked inside the code, nothing fishy there.

So I googled the error message, hoping to find some indication of what went wrong. Nothing useful turned up, all of them talked about importing of a package instead of a type or the exclusion of a required JAR file. Until I hit this Chinese website.

It mentions something about the Context path and docBase not being set correctly. Suspecting that my directory structure is wrong, I took the JSP page in question and copied it to the corresponding page in a web-app I know was working properly. I also copied the entire directory structure corresponding to the fully-qualified name of the class SomeThingStupid to WEB-INF\classes folder of the working web-app. And the result of the test was that it worked.

Then I checked the directory structure of the 2 web-apps and confirmed that the problematic web-app 's directory structure was wrong.

The structure of the working web-app was: $CATALINA_HOME\webapps\examples

The structure of the wrong web-app was: $CATALINA_HOME\webapps\interview-java-mock-web\interview-java-mock-web

The problem was that it was nested under an additional folder called "interview-java-mock-web" instead of being directly under the folder "webapps".

Reason for the difference in directory structure

I had used Maven2 to build the web-app, and part of Maven's advantage is that it makes the management of build life-cycle simple. However, there is a slight problem in executing "mvn clean". As stated in the "Getting Started" guide, this will remove the target directory with all the build data before starting so that it is fresh. Unfortunately, if your target directory is the $CATALINA_HOME\webapps folder, as indicated in the POM file, you will delete the entire webapps folder. This is not what I want. I want to delete only the files pertaining to the project in question and not the entire "webapps" folder, which contains other projects.

Hence my approach is to change the target directory in the POM file to $CATALINA_HOME\webapps\${artifactId}

Setting the Context element


So to resolve the original problem of the compiler not being able to find the class SomeThingStupid, the Context element has to be set in Tomcat. Taking a look at the docs, I created the file $CATALINA_HOME\conf\Catalina\localhost\interview-java-mock-web.xml

The file contains the following line:

<Context path="" docBase="/interview-java-mock-web"> </Context>

Working, but with a warning

Setting the Context element makes my web-app work, it also solves another problem of erroneous servlet mapping. However, there is a warning message when Tomcat starts up. I haven't found time to solve this.
Aug 18, 2007 10:21:06 PM org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase C:\Program Files\Apache Software Foundation\apache-tomcat-6.0.13\webapps\interview-java-mock-web inside the host appBase has been specified, and will be ignored

Monday, August 6, 2007

Thunderbird not receiving new messages for RSS feeds

Recently a lot of my RSS feeds in Thunderbird were not updated. There seems to be some issue with receiving new messages, a lot of my feeds were affected, though not all. Here's what I did to resolve the issue.

  1. Right-click the affected feed and choose "Properties.." .

  2. Under the "General Information" tab, tick the checkbox "Check this folder for new messages".

  3. Click the "Rebuild Indexes" button.

  4. Click the "OK" button.

  5. From the toolbar, click the "Get Mail" button.


That managed to solve the problem, but you have to do steps 1 to 4 for each affected feed, before proceeding to step 5. It can be a pain if you have dozens of affected feeds, but I don't know of a better way.

Sunday, July 8, 2007

Trying out Joost - the new, free way to watch TV over the internet

I've finally got an email from Joost telling me I can download the program and use it. What is Joost?
Joost is a new way of watching TV on the internet. With Joost, you get all the things you love about TV, including a high-quality full-screen picture, hundreds of full-length shows and easy channel-flipping.

Or so we're told. After installing and starting the program, the first thing you'll notice about Joost is it's user interface. It's simple, but it's slick. It's quite easy on the eyes, with the translucent menus and large rounded buttons. In general, it's quite easy to get around, and most things can be achieved by clicking the left mouse button.

To start watching videos, you can access them through the channel catalogue. It's pretty well-organized and lets you pick the channels from sorted by popularity or recency or staff recommendationsChannel catalogue
You can also search for particular videos.

Search results

Once you've found a video, you can click on the triangular "Play" button on the right-hand side of the entry to start watching. At full-screen, the video quality is watchable, it's somewhat better than Youtub, but not by a lot. You can reduce the size of the screen by clicking on it, and you'll notice the images are a lot sharper.

Screen 1

You can bring up the control panel by moving the mouse about when the video is playing, which allows you to pause, fast-forward or rewind, among other things.
Screen 5

A neat feature for bloggers is that there is an integrated function for blogging from within Joost. Not sure if it provides any value for me, but it seems useful for the multi-taskers who can watch the streams and blog at the same time.
Blog

Joost also lets you critique the shows by allowing you to rate it. The lowest one star means terrible and the max of five means awesome. It's a bit crude as there is nowhere to place your comments on why you think it sucks or shines. Anyway, here's what I think of "2005 Making of Sports Illustrated Swimsuit".
Rating shows

If you decide Joost is something you can recommend to your friends, you can send them an invite.

Invite

Is Joost worthy of the attention it's getting?

The user interface is well-done, but ultimately content is still king. There's some interesting content out there, including documentaries and sports and music videos, but I don't think there is enough. And I've been getting the following messages when I try to open a few videos, which is pretty annoying. Other times, clicking on the "Play" button simply has no effect.
Channel not available

Channel has no programs

Wednesday, June 6, 2007

Maven2 - installing 3rd party JARs

Have a little time these few days, trying to get familiarised with Maven2. Not for work, more for it's own sake, still stuck with a legacy app at work. Been reading about the praises for Maven over Ant but the learning curve for Maven is steeper than Ant. And I'm not sure that the Eclipse plugin is making it easier. Some accidents along the way when running "mvn clean" wiped out the entire webapps folder in Tomcat, not just the test app folder I was anticipating. Thankfully it's a fresh install of Tomcat 6, so it's just the default stuff that came along with it.

Anyway tried to manage some dependencies with Maven, wasn't as fuss-free as it's made out. Tried to compile a simple servlet under eclipse, but I couldn't add the dependency via the Eclipse plugin. Had to add it in manually in pom.xml.

Went to "C:\Documents and Settings\Administrator\.m2\repository" to take a look, looking for servlet-related strings. But not too sure about what I'm looking for so decided to install the JARs that came with Tomcat 6 in the end. Here's the commands I ran.



mvn install:install-file -DgroupId=tomcat -DartifactId=servlet-api -Dversion=6.0.13 -Dfile="C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar" -Dpackaging=jar



mvn install:install-file -DgroupId=tomcat -DartifactId=jsp-api -Dversion=6.0.13 -Dfile="C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\jsp-api.jar" -Dpackaging=jar



mvn install:install-file -DgroupId=tomcat -DartifactId=el-api -Dversion=6.0.13 -Dfile="C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\el-api.jar" -Dpackaging=jar



The Tomcat website has some instructions on using Tomcat libraries with Maven, but I can't figure out how to get Maven to download the libraries from the correct location.

Hang on, actually I do now. The following has to be added into pom.xml

[xml]

tomcat.staging.repos
http://tomcat.apache.org/dev/dist/m2-repository/org/apache


Friday, June 1, 2007

Problem starting Eclipse - JVM terminated. Exit code=1

Just hit this error today, I was able to get Eclipse running just a few days ago. Didn't remember making any huge change to the environment.
Eclipse error

Tried googling for the solution but couldn't find anything that worked. Then I remembered I switched the Regional and Language options under Control Panel while fiddling around with some software. Switched it back to English (United States) and it solved the problem.

Friday, December 1, 2006

Increasing pipelines for a faster Firefox

Recently, the YUI team conducted an experiment on optimizing web page performance. Though the results are not ground-breaking, it is interesting to see the figures. Using the Pareto principle, which says 80% of the effects is achieved by 20% of the causes, the YUI team discovers where this 80% is.
Table 1 shows popular web sites spending between 5% and 38% of the time downloading the HTML document. The other 62% to 95% of the time is spent making HTTP requests to fetch all the components in that HTML document (i.e. images, scripts, and stylesheets). The impact of having many components in the page is exacerbated by the fact that browsers download only two or four components in parallel per hostname, depending on the HTTP version of the response and the user’s browser. Our experience shows that reducing the number of HTTP requests has the biggest impact on reducing response time and is often the easiest performance improvement to make.

What is network pipelining? Mozilla gives a good explanation here. One way to increase the number of pipelines for Firefox from the default of 4 is to type "about:config" in the address bar. In the filter bar, check that "network.http.pipelining" is true. Then filter for "network.http.pipelining.maxrequests" and set it to a value you desire. I entered 7 and felt Youtube loaded faster. Didn't really test the effects empirically though. It's not always the case that a higher value is better though. It's stated in mozillaZine that,
Higher values will cause a delay before the first request completes but will make the last request complete sooner. Higher values will also cause more of a delay if a connection fails.

Thursday, November 16, 2006

Signup for SingTel IPTV trial

News of StarHub and SingTel's bidding war for the television rights of the English Premier League (EPL) has made many consumers unhappy recently. I'm not sure if our neighbouring countries are broadcasting it, if they are we can probably get to watch it for free. Else we'll just have to wait and see who wins the bidding war and fork out the cold hard cash. BTW, I didn't realise that watching those P2P streams was illegal.

Anyway, the SingTel IPTV trial has started, sign up here. I guess it's good to have some experience with the service before deciding to sign up or not. Not sure how this is different from Ideas BroadBand though, but I signed up anyway. Just be careful handling the equipment they're going to hand out top you, you have to pay if you damage them.

Amazon Unbox is a pretty cool alternative but it seems to be restricted to US users.

Wednesday, November 8, 2006

Wikipedia used to spread malicious code

There has always been the issue of the authenticity of Wikipedia articles, but now you have to worry about being scammed as well. After YouTube, it's another one of those examples of hackers using social networking website to spread their viruses around. The spirit of social networking is to promote sharing, and they provide a perfect platform for virus-writers. I guess we should be careful of what we get from the Web, doubly so for YouTube, MySpace, Wikipedia, or other social networking sites.
I download software like XAMPP, jedit, etc and the occasional stuff from download.com, from so-called trusted sources I suppose, but what if I want to download something from new and untried sources? I'll usually pass. I guess I'm biased towards them, but it's all in the name of security.

Sunday, August 27, 2006

Syntax Highlighting with GeSHi and csh_geshi plugin

Pasting code in Wordpress is not an easy task, Wordpress will tend to mess it up by applying filters to it. The GeSHi (Generic Syntax Highlighter) project not only prevents that, but also provides syntax highlight as well. To use it, you will need a Wordpress plugin. The WordPress csh GeSHi Plugin does that job well, the syntax is easy and is easily configurable. You will have to disable Wordpress's rich text editor though, at least when you need to paste code samples.

Some examples of the combination in action.

Simple:
[js]
function square(num)
{
return num*num;
}


With line numbering:
[java,Y]
public class Student
{
private String name;
private String matricNo;


public Student(String name, String matricNo)
{
this.name=name;
this.matricNo=matricNo;
}
}
Start line numbering from 10
[sql,Y,10]
select * from product where price>100 and type='ELECTRONICS';
select * from staff where name like '%JOHN%';
select * from store where manager='HENRY LEE';

Sunday, June 4, 2006

Why people bypass security here

There was a security briefing at work recently, and it left me with the feeling that the people coming up with the policies have not really understood why some people try to work around the measures they come up with. I admit that there will always be people who will do it out of ignorance, laziness or malice, but some times it can be mitigated.

  • Resources are not allocated or are insufficient. Example, if the company decides that workers cannot bring in their own thumb-drives and must use company-issued ones, then the company must provide it. If sharing of PCs is not allowed, then everyone should have their own working PC. If only tested software from the software repository can be used, then workers must be able to access it. Otherwise, workers will need to find some way to get their work done, many times against the security policy.

  • Management must take the request for resources by their staff seriously and provide solutions to them. If a worker has requested for a thumb-drive but has not been issued after an extensive period, he will just bring in his own.