Thursday, December 31, 2009

End of the year and End of the decades

A short personal summary of what happen in the last 10 years

- Survived through school and university
- which I have learned c, c++, python, java, php, javascript etc
- and change os, from windows from linux, thanks to internet in university
- thus develop slangs and TWAs
- and run a few programs in university, involve junior bullying
- then outside uni got involve in a few barcamps and foss events
- also developer events
- and got a first job, in a bank
- and quit it barely after a year
- and realized that the computer is smaller and smaller, from thinkpad to eeepc
- and still the old nokia phone is still the best, how ofter you get 7 days of battery life in one charge
- this among the few of many stuff in the last decade....

Sunday, December 06, 2009

switching to opensuse

opensuse is ok, it is linux, anyway so most is understandable..

With all localization build in, with many program. built in virtualization support(who don't provide that anyway in linux). Filesystem encryption support, with apparmor. plus with LVM. Plus all the enterpricey stuff like LDAP client etc.

wireless don't just works without tinkering. YES THANKS FOR THE TROUBLE BROADCOM. ATI will sucks so i don't bother using it. Python version is not the latest compared to ubuntu. but I use django mostly anyway. LVM is not as easy to setup, but I get the hang of it, you just need to make the the unused space as LVM, and resize it later.

Now please just let me do use my computer peacefully, I am just sick of have to be in between the stupid war between ubuntu and fedora....... So this is a small price to pay to avoid the annoyance in the community.

Though compatibility will sucks, but that is the job for xen(or kvm depends when I want to switch)

End of The Year Post: Community Attack!!!!!

** Long random Story Alert **
As usual, I just continue with a series of community events around me. Which is really interesting. Because some of the community is really a new one.

So some of the usual one is barcamp. Which is really the same. Though some of the geek among the barcamp community will give a more active role in the future.

As usual I am involved ubuntu-my, they are a official loco. And I have involved a little in mscosconf with them. But probably this is a last year I am involve with them. Or not let see...Since I change my os anyway. And I get cozy with fedora my...Which is a very technical community.

And python.my have started. We are a community of python programmer in malaysia. Which is an interesting community. One reason is, we are a programming language community. Consisted of user of both proprietary and open source software. We just join an learn the language. We also have our first big project with student. Which is pretty cool actually, me thinks.

So for some of the open source group in malaysia, many have happens. And many have get involve in universities. Which is very interesting to see. Though I really rather to see more synergy within all the groups.

So the tech community is getting active. Though, the community is growing. But the thing is, we don't just need to grow. I really think that some of the community really need to grow up. Attitude is a big problem for some. But generally it is interesting to see the community exist.


And we have a few that just started so stay tuned.

Wednesday, December 02, 2009

End of The Year Post: Environment Change

**Random Rant Alert**

The big thing that happens around the year is a change of environment. Changing from working in a cubicle to working at home, it is pretty, liberating.

This is due to the fact that I actually quit my job. Which a reason to feel good. For some reason I don't seems to match in the environment. Not to say that I learned nothing. There is some lesson I can applied from working in legacy software.

But currently my job don't seems like a job anymore. It is more like playing around with codes. And unlike the bank, I have finally goes to a environment that I familiar with, aka linux, with a programming language that is a fun to use(compare to what I use in the bank anyway). aka Python.

It is a good thing, a good that that I am now in a environment that I can learn, and play at the same time. A environment that is never boring. and full of challenges. A dynamic environment is probably good for me. This is different from the bank. A price of being safe for the business.

I actually begin to wonder whether this is a good thing. For some reason I don't think I can join the local software company, until I do the current project of mine.

Monday, November 30, 2009

End of The Year Post: Part 0

This shall be the beginning of a little series of review on the end of the year.

Know what... lets throw away New Year Resolution. It never work anyway.
A little plan is helpful, but I don't think, but I don't think i will stick to it anyway.

Lets review what I have done, what I have discovered, how to make things better.

But that only start on the next post.

Saturday, November 28, 2009

GitHub Gist is AWESOME!!!!

So the story goes that I need to paste some code online, and posting in blogger sucks.
and pastebin if i am not mistaken does not support, embedded into blog. but then i could be wrong.

So either way, a GitHub have a service called Gist at gist.github.com

and example for my yesterday example is
http://gist.github.com/244798

Thursday, November 26, 2009

using pydot with twitter

Was bored today so, I play around with pydot with twitter api



The result is.....not nice, because
1) The image is large
2) This is a very simple experiment, so i only check my follower, nothing in depth.

and i will not post the image, because of size, and privacy reason.
so probably more of this coming soon

Wednesday, November 25, 2009

fun with pydot

I am finding a way to visualize some stuff I working on. Visualize some data.

So I stumble upon a library called pydot. Which is a python wrapper for the Dot language of Graphviz. Both is open source.

An example i am trying now, after I install pydot

import pydot
graph = pydot.Dot(graph_type='graph',font='verdana')
graph.add_edge(pydot.Edge('John Doe','person',label='is a'))
graph.add_edge(pydot.Edge('John Doe','missing',label='status'))
graph.write_png('test.png',prog='dot')



It is pretty good, as you can see in pydot.add_edge is to add edge, and you don't need to create a node, because, pydot edge is defined by pydot.Edge(src_node,dest_node)

pydot is included in ubuntu repository.


the project page is in:
http://dkbza.org/pydot.html
http://dkbza.org/pydot/pydot.html

Saturday, November 21, 2009

Attack of the spambot

The comment too much spam to be moderated, consider to move content to wordpress

currently sweemeng.wordpress.com just mirror what i have here. so i didn't use it yet. but considering moving there....

Sunday, October 25, 2009

foss.my 09 is AWESOME

foss.my is held on 24-25 october 2009, it have gathered geeks, and freedom lovers around the KL, probably malaysia.

The talk within the 2 days is good, the bad thing is, how to choose within 3 tracks. We have pretty good speaker, like Pia Waugh, Brian Aker, RMS, Dr Yusseri Yusoff, among others. The talk is filled with either 1) useful knowledge, 2) free software, 3)  humor, 4) IDEAS or all above.

The committee is awesome for organizing such an event, but the audience on the other hand......
It is really sad to see that, some audience don't get free software or freedom for that matter, and some decided to go for open source without free software, WTF, how does that work without the other!!!
I still hope that some get enlighten by the 2 days, and hope that no one leave from foss too..

Either way, looking forward to next year. Some of Malaysian don't get it, fine with me. It is our job to keep it running, keep fighting for the freedom we deserve......

Friday, October 23, 2009

wonder about foss.my

Is excited on the talk, excited on the topic, and the people

Can't wait for foss.my

Tuesday, October 20, 2009

Happy (Belated) Birthday Ubuntu

The story of Ubuntu started in 2005, I was just a Debian user, then my computer hard disk died.
So I just book a few cd while waiting for money to come in to buy my hard disk, I can't download an image anyway. I was using Knoppix around then. Before that, Debian, then Mandrake, then Debian for a year.

I booked 10 few cd, you'll be surprise how long it take for me to give it out. Lecturer is not interested(welcome to Malaysia), only few friends want it. Give a few to the computer club.

Within 4 years, it grows from a Debian derivative that automate a few installation task, and a few script. To a distro that make thing so easy. And after that, linux in general gone mature as a desktop. Hell I barely use command line, as the result.

So you can blame Ubuntu for making me lazy, making me a lazy software developer, hehe. But an powerful OS, with mature backend, and good frontend, is pretty appealing.

A short story of ubuntu, and a happy birthday...

Saturday, October 17, 2009

One more week to foss.my

http://foss.my/

foss.my will be held next week, are we prepared!!!!

BTW, we now have 3 main tracks and 2 side sessions, and we have some great speaker.

Can't wait to be there

Tuesday, October 13, 2009

Learned new command in VIM

What I learn to use VIM today

Split A File
to split vim windows, in command mode:
:split filename
to navigate between windows
ctrl-w
or
ctrl-w

Copy A Block of Text
to copy a block of text:
go to the first line to copy, then type,
ma
BTW a in ma can be anything from b,c,d,e,....etc
then to the last line of the block to copy
y'a
Then go to the line to paste
p


To Replace Text
to replace text foo to bar in a line, go to the line type
:s/foo/bar 

to replace all foo to bar text, in a file
:%s/foo/bar/g

the g is to replace all occurrence, of foo

This is courtesy of
http://www.oualline.com/vim-cook.html#copy_block
http://www.vim.org/htmldoc/windows.html#window-move-cursor

Monday, October 05, 2009

foss.my bof attack plan

Remember guys we got only 1 1/2 hours
Topic Suggestion

- A taste of Karmic

Stuff to prepare(suggestion)
- CD, 
- goodies as prize?(if don't have nevermind la)



Monday, September 21, 2009

An interesting network configuration

The story started when my router is acting up. And my new modem is actually a router(with one port), and comes with its own dhcp server. ..

Either way, i am just lazy, so i just keep the dhcp server running on it.
Bad idea......
turn out that my wrt54gl aka my router, use the same ip, which is normal, because a lot of them use 192.168.1.1 as the ip anyway. even though it is on the internet port, it still cause problem. I thought the internet port and the lan port is separate

the hack is, just just each of the a different subnet for router......
so if the modem is 192.168.1.x. then change the router to 192.168.n.x. just give it a different subnet.

And interestingly, i can access telnet to my router, from lan connection.....

Monday, September 14, 2009

MyGOSSCon: Malaysia Government Open Source Conference

MyGOSSCon is the Malaysian Government Open Source Conference. Which brings together industry players, community members and government agencies, in 3 days events, 4-6 November. Which is consist of talk, and Birds Of a Feather Session.

Call for paper is now extended, so anyone that interested can submit their CfP now. At http://mygosscon.oscc.org.my/2009/call-for-papers/

Saturday, September 05, 2009

My google wave robot

Not too long ago I got myself a google wave account. Which I got myself into a wave hackathon in GTUG KL. Which happens last month.

The result of a hackathon is google wave robot, called eventdator(I'm lousy at making up names):
http://bitbucket.org/sweemeng/eventdator/overview/

What it does now is, it associate a event name with a date. Which stores in the appengine datastore. To use it:

1) Add the robot on the wave, address is eventdator@appspot.com
2) The command to use is:
get:event name
then done
3) To set an event 
add:event name,eventdate,true
set true if it is a holiday. else false.

I still open to feature request. And I still figure out how to have a better interface, etc.

Thursday, September 03, 2009

FOSS.MY registration, with EARLY BIRD DISCOUNT!!!

The yearly open source event, FOSS.MY will be held in 24-25 oct 2009.

You can register now details at the links below
http://foss.my/2009/registration-overview/


What you get this year is
  • 32 great talks and 26 speakers!
  • Double track side sessions running throughout the conference, with Bird-of-Feather side sessions
  • T-shirt
  • Lunch provided
  • Two tea breaks
So register now!!!!

Saturday, August 29, 2009

Software Freedom Day KL

http://softwarefreedomday.org/teams/asia/Malaysia/KualaLumpur

Software Freedom Day will be started in KL real soon. This year, we try to do something different. We will try to get unused but usable PC, then install Free Software on it. And give the pc to those in need.

The main event of SFD KL will be training, and install-a-thon. 

I still can't decide the date yet. Because 19 September is the day before Hari Raya. Which will be a long holiday for a lot of people, so SFD will not be held like others. I hope to do it either by 5/6 Sept or 12/13 Sept.

So what do we need.
1) Old, Unused, but usable PC, or PC part. We promised a few, already.
2) Volunteer that is available.


The first meeting is Sunday 30 August 2009, at 6-7pm, in Burger King, Mid Valley KL.

Monday, August 24, 2009

"yield"ing some python

def even():
    for i in range(10):
        if i%2==0
           yield i



Was playing around with python simply because i am bored. I discovered the keyword yield. Which is a Simple Generator in Python. Which is in PEP 255.
For information, generator is a type of routines that can be used to control a loop. Instead of having a function that return the whole list or array. You can yield it one by one, using the yield keyword. As the function above. 

With the function above, you can. 

for i in even():
    print i
 

Or 
i=even()
while i:
    print i.next()

While the second one will ends with the error. I should find out what is the handler for the exception. 
I think it is pretty cool. But really I still trying to figure out what i can use this for. 

Tuesday, August 04, 2009

Automate interactive script with pyexpect

Sometime it is actually nice that automate interactive script, aka the one that need user to input something to continue. Such as django manage.py script

So I found pexpect, it is a python version of expect, which does that.

For example to use with reset the database in django:
import sys
import pexpect
#call the commands
result = pexpect.spawn("python manage.py reset_db")
#tell it to expect what should shows
result.expect("Type 'yes' to continue, or 'no' to cancel")
#send the results
result.sendline("yes")


Actually you can use it to run programs. Without the expect methods or sendline. The program will just runs
import sys
import pexpect
#just run the command

commands = pexpect.spawn("ls -a")
print commands



BTW, do check expect, it is the one that runs without python. Which is what  pexpect based on. Either way, it should be available to any linux distro. On ubuntu find expect and pexpect on synation, it is there.

Sunday, August 02, 2009

output json on django

I just finish a job in django, and I use it for some ajax part of the project. So I generate json for this. Below is a snippet sanitize from the code my job use...

try:
import json
except:
from simplejson as json
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
def generate_json(request):
#it can be a dictionary too, anything supported by simplejson
somelist=[]
#do something here, to fill in somelist
encoded=json.dumps(somelist)
response['content-disposition'] = 'attachment; filename=properties.json'
response=HttpResponse(encoded,mimetype="application/json")
return response

So there it is...

p.s I need a way to display source code properly on my blog, idea?

Friday, July 17, 2009

The story of Bad Browser, Botched patch, and software Conflict also DRM!!!!

I have a confession to make.......
I am a gamer. I like games, and actually spent cash to get legal copy, to "support" the industry. And for certain game, it is worth it. Like most commercial games, it runs windows, and require proprietary software like IE and Windows, to work.

Of course, what happens in the last few days is this. I bought Spore Galactic Adventure, and it requires me in apply certain patch. Which breaks the game.

Actually that is just the beginning, turns out that the updater need to run with IE, which is a bad thing, IE 8 on my desktop, can run flash, but everytime I restarted, it requires me, to reinstall flash again. And the updater from EA, need IE to run!!!
Just embrace the defacto standard already!!!!

Along the way, I try to update the driver from ATI. First it turns out that, it conflicted with visual studio express I install long time back, from microsoft. I have to remove the visual studio express, old version to install driver. The solution is not even obvious!!! I think it is really crazy, that this happens.

Then finally, my brother want to borrow Red Alert 3 from me, to borrow his friend. Then I can't give it, because it is copy protected(OK, I want to play it). So now I still trying to explain copy protection......The fact you cannot share stuff is really counter intuitive..

Maybe it just me not getting used to windows, or this guys really sucks in term of quality. I mean, it is strange enough that driver don't update itself. Old installation of visual studio affect software installation? IE that don't play nice with anything........

Friday, July 10, 2009

GPL Code Statement on my router

My house modem got fried, so get a new one I have. While I don't expect it, it comes with a GPL Code Statement. Sure make me wonder whether it runs linux or what....

Btw the model is Dlink DSL-520B(Mounted on my WRT-54GL(another router running linux)..
 
 

What i am really curious is, how many hardware in malaysian market is running Open Source Software, as in using Open Source Software within their hardware(aka the firmware?) And how many comply with GPL....

Friday, July 03, 2009

Fun with Linux: Taque


So i got a remember the milk account. What's cool is, it is a nice web based, todo list. What really sucks is, there is no desktop client on linux. Until now.

Tasque is a todo list manager, it have a local file backend, and most importantly, it can use remember the milk, as backend.

It is pretty easy to use, just enter task, and it is done. One interesting thing is, you can enter "do something today" it will automatically, fill in the date for today.

What really sucks is, it don't have notification. But it is useful enough, to use.

To install on ubuntu,
sudo apt-get install tasque

But i can't seems to get it work, with fedora. Enlighten me please

Monday, June 29, 2009

Is loving screen

So I got a job, which allows me to develop on linux...(w00t!!!).
Along the way, I have found screen....

screen is a full screen windows manager that, multiplexes several process. Usually active shells. As quoted from the man page.

The thing is, it is useful that, I can run several shells. Without actually have to open several instance of gnome terminal. Which is useful, because I use a lot of vim nowadays. And really have to open several windows just to have several terminal tend to be distracting.

screen is not hard to use, 
Ctrl-a + c        : to open new windows
Ctrl-a + n        : switch to next windows
Ctrl-a + p        : switch to prev windows
Ctrl-a + Ctrl-a: toggle between 2 windows
Ctrl-a + ?        : is the help(if you don't remember the rest, just remember this one)

BTW I found that this is useful for my eeepc as well. Consider that, I found that console apps tend to save a lot of screen space...And too much windows open, then to be hard to navigate.

Saturday, June 13, 2009

Learned how to use rsync

So I need to sync a folder between 2 computer my laptop, and PC.
So one way is to use scp, but I don't quite want to replace the folder. Just files I created. I just want to make sure the folder is in sync.

So I play with rsync. Which track changes of the files, and transfer the changed file only. From what I understand from wikipedia anyway.

And what so cool.The command is similar to scp, or cp. So the command for rsync is:
rsync source dest #for files
rsync src@hostname:source-file dest #from remote host to local file
rsync src dest@hostname:dest-file #from local file to remote host
rsync -r src dest #this is to transfer folder
So just change source with files, hostname with hostname or ip.

So another tools I learned as a newbie......

Thursday, June 11, 2009

Linux Emergency: entering Single User Mode in fedora

So I installed ati driver on Fedora, BAD IDEA. Because, once you finish booting, you cannot even call virtual console like alt-f2.

Solution is to access Single User Mode. Then run the uninstall script.

Actually single usermode is not limited to this, it is meant to be used for some of the worst case emergency.

To go to single user mode
Once rebooted,
1) Go to grub menu
2) Select the option to boot into linux
3) Press a
4) it should shows something like this
kernel /vmlinuz-2.6.29.4-167 ro root=LABEL=/ acpi=on rhgb quiet
Just add "1" behind it

kernel /vmlinuz-2.6.29.4-167 ro root=LABEL=/ acpi=on rhgb quiet 1
5) Press enter

You should be able to access the shell as root without login. Now you can do anything to fix your problem.

This is dangerous,because you can access everything, yes everything. Enjoy!!!

lesson of the day: proprietary driver cannot be trusted......

So I finally installed fedora 11, upgrade using preupgrade. (YAY!!!)

So first thing first, DESKTOP EFFECT, then I check whether it is supported,
For open source driver, it support 2d acceleration, which is sad
http://cgit.freedesktop.org/xorg/driver/xf86-video-radeonhd/plain/README

So I got grab driver from ATI......Bad idea.
http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx?type=2.4.1&product=2.4.1.3.5&lang=English

Installing is easy, but once I finish install, reboot, it render the system unusable.

Thanks to ditesh, on twitter, Problem is solved. That would be another blog post.

I still hopeful that open source 3d driver will be here. For the graphic card that I own anyway.

Wednesday, June 10, 2009

Where to learn stuff: Google I/O

http://code.google.com/events/io/sessions.html

Was spending time learning stuff, some of the talk is pretty good......

As usually, it is really cool....

Upgrading fedora aka lesson of the day

Yesterday, I am downloading the whole image to upgrade my fedora installation.

I just learned that, I can just use Preupgrade

Just run preupgrade, as root

Tuesday, June 09, 2009

Job Hunt aka I'm Lost Edition

So I'm searching for a job, trying to find a job as a programmer. Preferably python, java(very rusty), probably php(not too fond of doing it, i can live with it) too

One interesting notes here is, there is quite a number of .net or vb job on job board that I found, with some java and php. Was hoping to find job on python. No luck there. Probably I should comes out with a statistic of this.

Comes a realization, I begin to wonder, should I just master a language because of a job, or I just master it for fun? Or rather, should I master a fun language, or master a language with more job opening?

In reality I'm pretty lost. And indirect pressure from family really sucks......

BTW, I'm ready to be hired. I know python, and django. I can do some java too, albeit very very rusty...

Monday, June 08, 2009

Fun at geekcamp!!!!

Last saturday is geekcamp. It is a camps for geeks, no entrepreneur, no internet marketer, and no social media people, just geeks. The camp is about technology, no marketing, just tech.

The talk ranges from iphones, to functional programming, web programming, clouds, etc.

The events is packed, while not unconference style, Kamal manage to bring in many people to teach us on some of the trends in technology.

I think that we should have more of such events, an events where techie comes in to learn, and teach, and stuff on technology. Specialized events for techie alone.

What it would be cool is, it span more days, not just 2 days. And where is the slides.....

msc open source conference

MSC Malaysia have organize an open source conference. MSC OSCONF, is the first such event organized by MSC Malaysia.

The talk
Overall the speaker lineup is good. There is a number of community that participate in this. From Ubuntu-my, fedora etc. They also have developer to shows the latest trend from the community. We have developer from Postgresql, from bsd community, red hat etc. Some of this folks is fun!!!!

We have good talk on various topic in open source technology. I really missed the python talk, something happens on the first day. Many shows the trends in open source. And the keynote is awsome. I wish to see more.

Lightning talk is some of the best talk, better than the talk itself. The topic tend to be intermediate. And surprisingly good. Cyber merdeka is the best one, among the lightning talk. Map reduce. and it is can be funny at time.

A bit of comments
MSC that organize such events have done a good work not just on speaker, but most of other thing. Food, the place is strategic, with public transport to everywhere. And they support local community, it is a good thing.

There is some issue on the internet connection. It is best in the future that TM NET, give proper service they PROMISED. It causing so many trouble, we almost not able to run the install fest. They only shows that our ISP is NOT able to provide better service to the community. We losing face.

Timing wise, it is a bit wrong, because such events should target the software developer community. And I don't think that having such events on a weekdays actually helps. 

Conclusion
I think this event is good, wish that the next one, would be better in the future.

BTW
the links of the slide is here, thanks to En Haris, aka LinuxMalaysia
http://www.slideshare.net/tag/mscosconf

Thursday, June 04, 2009

Random Thought of the day

Was at the myoss meetup, and we have  a little "Teh Tarik" session.
Some one was suggesting to me, why don't you just get a grant from mdec to start a business.

Since IT industry in Malaysia pretty much suck anyway. That's one reason why i am not quite keen to find a job yet.

btw will post all the stuff here. Real soon

slides from mscosconf

Cyber Merdeka (Cyber Sovereignity) Cyber Merdeka (Cyber Sovereignity) azrulhasni6330
Publish at Scribd or explore others: Internet & Technolog Research cyber open source

The slides is coming in one by one for mscosconf.

Full thought of the whole events coming real soon!!!!
after barcamp penang 

Sunday, May 24, 2009

Tech Events Of the week: geekcamp

30th of May, is geekcamp.

Geekcamp is an unconference, targeted at techies, and geeks. It will be a full day of tech talk. No entrepreneur, no marketing, just tech. Which is refreshing really.

It will be held in Intregricity HQ at Center Point, Bandar Utama.  3

Like most unconference it will be free.

Sunday, May 17, 2009

Public Wifi in KL: FAIL

I am in Lowyat with Ubuntu loco for preparation of the launch party.

So while I wait, I try to use the public wifi. Which is from 2 provider. The first is, klwireless, the other is from time.net.

The thing is, klwireless fail, totally. Partially my fault, because I forget my password, and my security question. But there is no way of reregister a account, without a new phone. So until I get a new phone, I can't use klwireless anymore.
And time.net fail because it don't provide service anymore.

And starbucks around the area, don't provide own wireless anymore.

What I found interesting is, if somebody is serious providing wireless in KL. They should make it free, and why on earth do i want to register for the first place. Sickening, sickening

Friday, May 15, 2009

Leaving Jurassic Park aka Scope International

Today will be my last day at work.

Finally I'm able to say, good bye to the Dinosaurs in my work. Tech Dinosaurs and other Dinosaurs. So long to cobol, bye-bye mainframe. Nice to meeting you all, probably this will be the last meeting. You all will (NOT) be missed.

Honestly Cobol, I really cannot stand you have only Global Variable, not to mention horrible syntax. Who On Earth still use "move data into variable" in their code or have a full sentence as a loop like "perform x until y is equal to z".

Mainframe(System-Z), you're a strong guy. But really having to run program via batch is pretty crazy. And you suck at giving me place to write script. Suck at automation!!! What On Earth is the 8 Character limit. JCL is use in batch, but WTF with the syntax!!!
 
Maybe one thing I really say goodbye to. Is probably bad working culture, and over specialize in a software package, instead of fundamentals. Or probably working in something I am not passionate on. Or being treated like a robot...

Technical speaking, there is still thing that I can bring back. REXX is one, it is promising as my other scripting language, with port on linux and windows, and with special features such as integrating os utils as part of language. That I can use.

Others is experience involve in a role in maintaining large software, probably even testing itself. Rather how not to screw up, hard. And understood that it is really a pain to use a legacy apps. And needs of automation.

Really I learn how to please your subordinate from my line manager. And contact of my lunch buddies.

Really I wish to say goodbye to someone, but i leave the idea off. Hopefully it should not be long for me to forget about her. As I have tonnes to work on.

Saturday, May 09, 2009

fun with python: feedparser

I try to play around with podcast feeds, actually was hoping to generate the link for me to download the media from podcast.

Either way I found this open source library. Which is fun to use.

http://www.feedparser.org/

I just skip the installation step, you can get it from the repository if you're a linux user.

To use the universal feed parser, in the shell
>>>import feedparser
>>>d=feedparser.parse("source of rss")

what you get is a dictionary of data from the rss. More on how to use it here
http://www.feedparser.org/docs/



Sunday, May 03, 2009

adventure with yahoo yql: part 2

Because yql, have a rest based interface. And it generate data in XML and JSON form, it is interesting to write program for.

Below is a small code I have written using python 2.6. Which I wrote in python shell.

First:
import json,urllib

If you use python 2.5, you should first install simplejson, then:
import simplejson as json
import urllib
my
Next step, in one line:
query=urllib.urlencode({"format":"json","env":"http://datatables.org/alltables.env","q":"select * from weather.local where location='myxx0008'"})

urlencode takes a dictionary to encode into a form, that is url friendly.
From dictionary, "format" describe the output format, change "json" to "xml"
"format":"json"

"env" describe the table source, change 'http://datatables.org/alltables.env', to channge data source. BTW the this source contain alot of definition to use..
"env":"http://datatables.org/alltables.env"

"q" is the query, change, "select * from weather.local where location='myxx0008'".In this query, location is mandatory, but it is data source dependent. Use "desc tablename" first is a good idea.
"q":"select * from weather.local where location='myxx0008'"

Moving on, once the above command finish. We can use urlopen to generate data to load into json api. Using query generated above.
result=json.load(urllib.urlopen("http://query.yahooapis.com/v1/public/yql?%s" % query))
One reason to use json here, because getting result data is pretty easy. It is deserialize it into a python dictionary.

For example to get the weather data,

print result['query']['results']['weather']

It deserialize into python object. Another example to get temperature

print result['query']['results']['weather']['cc']['tmp']

To wrap it up, in a simple script
try:
#try to see if it is working
    import json,urllib
except:
#in case you're using python 2.5, BTW install simplejson #first
    import simplejson as json
    import urllib
#encoding
query=urllib.urlencode({"format":"json","env":"http://datatables.org/alltables.env","q":"select * from weather.local where location='myxx0008'"})
#get the data and deserialize it.
result=json.load(urllib.urlopen("http://query.yahooapis.com/v1/public/yql?%s" % query))
#print temperature data
print result['query']['results']['weather']['cc']['tmp']
This a simple script to test yql. Somebody should really write a library to wrap it up. And the above script I use public data tables. Some yahoo data tables, uses oauth. Which I bypass it.

One thing i think of yql is it is convenient to have one place to query data. And with sql like command to filter data is interesting. But still not quite sure whether, this is necessary.

adventure with yahoo yql: part 1

Not too long ago, yahoo have release yql. What it does is, it query data from webservice, in a SQL like language. So you can have query like,

select * from tablename
use tablename
desc tablename
There is other query like join, and subquery, etc. But all the yql is read only.

To use the query, you can actually
First, you can use the query console, here. But the query is limited to build in tables from yahoo. Which expose data from yahoo api.

Above is the query console, with build in tables from yahoo, or a more interesting one is here. This actually use table from community made table.
Now you can not just can query yahoo's api, you can query weather data, twitter data, etc

The community made table is hosted at

Which is host at http://datatables.org/ with links to the table hosted on github too.

Another way is to use the REST based interface. For example
http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20search.web%20where%20query%20in%20(select%20title%20from%20rss%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22%20%7C%20truncate(count%3D1))%20limit%201&format=xml

Which is a bit of a handful. Which you should write a program to do so.

More can be found in the documentation here.

Saturday, April 25, 2009

Enabling Telnet(ssh) to a DNS-323

I actually own an NAS, a DNS-323. Which happens to runs linux. It just the system is locked down.


I don't really do much except to stash my stuff on it. Until now. Turns out that there is a community around this device, and they have done impressive stuff on it.

Most of it revolve around fun_plug.

To use it is. Essentially, Download fun_plug and fun_plug.tgz from here  .
And copy to Volume_1


And reboot


In the end of the day, you will able to telnet to the NAS, as root without password.

So you should run in telnet, pwconv,

pwconv
passwd
usermod -s /ffp/bin/sh root
pwck
grpck
login
if it is working, run the command in telnet to store password.
store-passwd.sh
        
You should really enable ssh, in telnet.
cd /ffp/start
sh sshd.sh start
And you should at least enable login for telnet, go to /ffp/start/telnetd.sh, find and remove '-l /ffp/bin/sh'.Use vi to do that..

Now we have a linux machine finally look like a linux machine, use shell, and ssh. That's not all.

The community have a few package to be used in funplug, you can investigate here, at middle of the page. They have ported backupPC, lighthttp, python etc.

So we have a full scale linux machine, and due to GPL compliance, dlinks have the tool chain plus kernel open to us http://wiki.dns323.info/howto:crosscompile. So we can cross compile software to this device too. And actually install debian, but with risk of bricking.

Have fun!!!!


Friday, April 24, 2009

Why I have quit facebook Quiz

The thing, facebook is useful, sometime, it is really interesting to see hows everyone doing.

Interesting photos, interesting activities. But quiz is fine, until, it flooded the view.

It is annoying, real annoying, the realization that it annoys me, make me stop taking the quiz.

Maybe you should too.

BTW I already block many quiz from my view in facebook...

Sunday, April 19, 2009

ureka weekend: the end and thought

Miss blogging on the second day, because lose sleep the night before.

Either way, the conclusion of Ureka Weekends, means that another lesson
learn.

What I learn on planning
  1. It is very dynamics, plans changes all the time
  2. Or rather plans evolve over the time
  3. I really mean evolve, because plans need to survive
  4. to survive means it need to make money
  5. plan that makes money will survive over plan that doesn't
  6. so interesting project alone don't work, it need to feed us
  7. and flexible plan survive longer
What I learn from team
  1. A heterogenous team is better than homogenous one
  2. Means it is better to have a team with different skills
  3. Because it opens us to different way of thinking. 
  4. Horizons opens
  5. Sometime, having to rely a skill from a person only is tiring, so sometime having someone else with the same skills to complement rocks. 
What I learn overall
  1. Running a business, the goal is to make money. 
  2. While doing something we like, such as coding, just to ease the pain
  3. Job is still job.
  4. Once we got enough, then it will be time to be crazy. 
I think this is what happens

Friday, April 17, 2009

ureka weekend: day 1

This is day one, and we have ideas coming IN.
Thanks to Joana we have a team.

Will give them details on the roles in the morning.
Remember to bring the camera today

Thursday, April 16, 2009

Happening in the community

There is a number of happening among the community.

UrekaWeekend
UrekaWeekend is an event where we simulate a startup, during the weekends. It starting tomorrow.

HackerSpaceKL
HackerSpaceKL begin to move out of planning stage.
http://wiki.hackerspace.my/

It is started by mel. We currently finding venues, and equipment sponsors is welcome.

GeekCamp
An aftermath of barcampkl(that sound so wrong), Kamal begin to plan for geekcamp, it is a theme based camp, in the case, it is tech.  For those that interested,


MSCOSCON
And mscoscon is happening, seems that they bring some good speakers. But what really sucks is that there is closed source software used in the hackathon.

Sunday, April 12, 2009

How to run a community project(aka what I learned from barcamp)

After slacking over the weekend. Here is a new post
This is what I learn during barcampkl, and have many part copied from barcampkl post mortem.

Barcampkl is in a way doing well. Of course it can be better. But this is not about blaming, nor it is just about barcamp. Here is a do and don't for a project similar to barcamp, probably hackerspace and other events as well?

Do:
  1. Accommodate a variety of audience, it one spice things up, and it opens up ideas. During barcampkl we have a variety of topic, and I have learn a lot, because of all the topic is new to me. We also miss out the tech community. We need to balance the audience.
  2. Provide sufficient infrastructure, during barcampkl we have enough room, which is a good thing, we have more input, and a place to hang out. We also have lousy internet connection, so hackathon didn't goes as plan. Also loud speaker.
  3. Give(take) roles and responsibility, even in a loosely structured hierachy like in barcampkl, we need to have one person to take responsibility. For example on the web contents, etc.
  4. Accountable, the big idea is, we need to know what goes on. Have a accounts that is viewable. It is also fair to people that contribute
  5. Keep a inventory, we have our own stuff, during barcamp, we bring own stuff, and also stuff that is sponsored. As In 4 we need to be accountable
  6. Have backup plan, during barcamp we are lacking in vga cables. It is better to be safe than sorry. 
  7. Give credit to where the credit is due, in the case of barcamp, give credit to sponsor. Of course other contributor
  8. Communicate a lot among members, we need to know what happens.
  9. Have a roaster.
  10. SHARE!!!! We have a slides on slideshare for barcampkl
Don't
  1. Commercialize an events, people is at events like this to learn. So marketing talk is bad.
  2. Make own decision, have a concensus. Don't change anything such as schedules. Most of the time anyway.
  3. Make some people do work, till it misses some session they want to join.

Sunday, April 05, 2009

Post BarcampKL

BarcampKL finished yesterday.

The good thing is, the topic is more general. There is not much of a bad thing, except WHERE IS WEREWOLF? Just kidding there.

There is fewer tech talk, as in hard core tech talk, this time, but now there is more general talk that would appeal to more general audience. Suddenly barcamp missing all the geekiness, it is both a good thing and a bad thing.

Pecha Kucha is not there. But there is lightning talk. 

The talk is good, mostly. And I should try not running around too much.

By the way, good job to everyone......

Thursday, April 02, 2009

Saturday, March 21, 2009

Friday, March 20, 2009

Hate to fix PC other that my own.....

The problem of being a person that "knows" computer, is that. People just expect you to just fix the computer.

It is a problem especially for Asian, because it is rude to say NO. If it is not bad enough:
  1. We might not have extra stuff, like keyboard, monitor, etc. We actually rely on google too, so we need the extra gears
  2. They just assume it is easy to us
  3. They just assume we have windows disk, which I don't. Worst IT IS ILLEGAL TO SHARE.
How we can fix it.
  1. Force computer literacy to people. I hate to listen to people saying they don't need to know. If they know the basic of fixing car, what stop them, from learning the basic of computer.
  2. Give open source software to people, until proprietary software is more stable, and more affordable. Then problem will happen.
  3. If they are going to send computer for us to fix. Bring the WHOLE THING. Stop just bringing just the casing minus the keyboard and stuff.
Just a thought, just a rant...

Saturday, March 14, 2009

BarcampKL: I'm SO There
















Barcampkl will be held 4th April, in Inti College in Subang Jaya.

Barcamp is a event where everybody share, and learn. It is an unconference, where, everything is adhoc. The participant, tends to be tech people, and entrepreneur, but previously in Barcamp JB, we have a number of non-tech and non entrepreneur topic, it is also not commercial.

What make barcamp different is, it is organize by volunteer, and topic is from volunteer. It is free. And everyone is a participant. This is not  just a (un)conference, it is also a place to network with people. And you shall see, why we are all a fun loving people.

So if you want to learn, or have knowledge to share, come and enlighten us.

Saturday, March 07, 2009

Recipe For Disaster

You will need:
1) A PC with
- Less than 256MB Ram
- Less than 20GB Ram
- Windows xp
- Not maintained properly
- with usb disabled
3) All sort of application that will be needed for work
4) A team that don't always do maintanance for the machine.
Spices
1) Virus, or worms, trojan
2) Outlook client

What to do:
1) Just use the  computer as is.

When you know it is ready:
1) You will run out of space. Windows xp, might not tell you that.
2) You cannot delete Email in Outlook, because it out of space, >.<||
3) The computer will slow down.
4) Antivirus will not run, because it run out of space, btw, with space full, there should not be new infection

Sunday, February 08, 2009

linux community promotional effort

What I noticed is there is a number of promotional effort by the Linux community in malaysia. Usually by the same group. In the malay language

Here is the links for their slide show in
http://www.jomlinux.com/v1/index.php/20090208211/Artikel/Berita/Slideshow-dari-e-kedai-Jom-Linux

They also have a video on how Ubuntu linux is used in the Parliment Office in Ampang.
http://www.jomlinux.com/v1/index.php/20090203209/Artikel/Berita/Dokumentari-Mini-Ubuntu-Di-Parlimen-Ampang

Friday, January 30, 2009

My Adventure with Photorec

The whole story started when my cousin ask me to restore data on her broken hard disk, I don't think it is broken btw, more like corrupted partition. Either way, I still need to recover her data.

That's where photorec comes in. Photorec is a tools to recover data from harddisk, it is a program comes with testdisk. Don't be fooled by the name, it can recover documents, video, mp3 etc, not just photos.


First you need to find the partition, you can just type in terminal
fdisk -l
Then in terminal
photorec /dev/
replace device name with sdb, hdb etc.

Then just follow instructions.

And there you have it, it will create a folder on where you create it, with all the data. It is quite easy to use.

To install on ubuntu
system -> adminstration -> synaptic package manager
 Find testdisk

On fedora
system -> administration -> add/remove software
search testdisk.

BTW there is a windows version. But i test this on ubuntu.

P.S This actually is a bit anticlimatic, I actually expect to create a disk image, and use sleuthkit. photorec is much more easier. That atchek, hehe.
 

Monday, January 26, 2009

my little( cousin's) adventure with Sugar

It is the lunar new year, and I got relatives visiting us.

With them is my little cousin, which is around 7 years old. Since I got Sugar Desktop installed. I let them play with it a little. And it is an interesting experiment in a way. Because they did produce something with turtle art activity, and they seems to like Memorize activity. Either way enjoy it.

Btw, Sugar is a dekstop environment used in the olpc. And it is actually available in repository. But the thing is, not everything is there. So I actually consider to compile it.

But it is an interesting experiment

Friday, January 23, 2009

screwed up internet in malaysia

I rediscovered miro, like last. Which is a very cool open source apps, that subscribe to video feeds, and download it for our viewing features.

But of course, there is one problem. The thing is there is plenty of interesting stuff to watch, from feed from Revision3, Discovery, Make, TED, etc. And really the video is not small. Quite a number of it is around > 100 megabyte. And because I only have time on weekends, so I do it in  batch.

That's where problem comes. You see, TMNET, is giving substandard service, worst we still stuck with slow speed, around 100 Kilobyte. So it could take me like half a day to download it. And last time, I use maxis 3g, it gives Bandwitdh limit of 3gig. My download already taken half of it already.

I mean seriously, it is about time, for someone to actually fix the ISP or network malaysia. I mean, with many (legal)content online. With organization actually provide online videos. We cannot keeping thinking that 1 megabit is enough, it is not. And we cannot actually 3gigabyte limit is enough for everyone.

With the number of media, online, it probably not enough, for most people. This is not the 90's where people just use the web for emails, and searching. Videos is online, song is online, software is online, finally even documents is online, etc.

Really I am just sick of have to wait for the whole day just to finish a video.

Saturday, January 17, 2009

Sharing Keyboard and Mouse using synergy

Some time it is nice to actually able to share keyboard and mouse between my laptop and desktop. 
 
The good news is, synergy actually allows such functionality, and it give the ability to share the clipboard too, meaning you can drag and drop between 2 computer. 

To start using synergy

On ubuntu go to the menu

system -> administration -> synaptic to install it. Or you can just

sudo apt-get install synergy

On fedora go to menu
system -> administration -> add/remove software and search synaptic

Or you can just
yum install synergy

To start using synergy
create a text file called synergy.cond
section: screens
        comp1:
        comp2:
end
section: links
        comp1:
                right = comp2
        comp2:
                left = comp1

end

change comp1 into the name main computer or the server, and comp2 into the secondary computer

On your main machine, open a terminal and type

synergys -f synergy.conf

On the second machine

synergyc -f 
Now you can share keyboard and mouse, with another machine. BTW there is a windows version too. http://synergy2.sourceforge.net/
 
 
this article originally in mandarin, on myclug.my, written by me
http://www.myclug.my/wordpress/?p=74 

Friday, January 09, 2009

Malaysian Ubuntu Kit



A member of the malaysian ubuntu loco, have comes out with a kit. Comes with a handbook, and packaged, it is meant to make it for most people to learn linux. And yes, it is meant for malaysian in general, which is why, it is in Bahasa Melayu, Malay language.

It comes with a booklet(printed in color), ubuntu stickers, cd and a casing.And it is RM 13.99.

http://kit.jomlinux.com/index.php?option=com_content&view=article&id=3&Itemid=3

More info,
http://kit.jomlinux.com/

Saturday, January 03, 2009

A useful tools: Powertop


One problem with my eeepc now, is that I didn't get the battery life it claim, on windows and linux on the eee pc. That is 8 hours. Currently it is only 4.5 hours.

One way to figure out what is using the power is, using powertop. It is a open source tools to use to display the process that is using the power, and give recommendation. Which is cool, because, it actually very convenient. But of course, you really need to do it manually, because the solution is missing after a reboot.

For ubuntu user, just

sudo apt-get install powertop
And powertop need to be run by root.