You’re always one step away from alienating your users…
http://forge.ironrealms.com/2007/05/02/digg-users-revolt/
Niels Joubert's Portfolio and Blog
Archive for the ‘Uncategorized’ Category.
http://forge.ironrealms.com/2007/05/02/digg-users-revolt/
Midterm for Computer Science (machine structures) tomorrow, Research Report for Radio Astronomy Tuesday, Electrical Engineering problemset Tuesday, Computer Science project Friday (recursive assembly, floating point).
Right NOW, I’m “launching” my one-page radioastronomy site! I spent some time doing pretty CSS and having fun with Aptana, and voila! Welcome to Radio Astronomy 121, please click here to see the craziness!
http://ugastro.berkeley.edu/~njoubert/
Peace!
Here’s a handy post I did on getting CVS set up on the servers at Berkeley.
Hi everyone!
After hearing several horror stories of programs magically blowing up
and people having to start over because I can’t find the bug, or people
keeping 8 backup copies to make sure nothing goes wrong, I find myself
in the rare position of making up for my flamewar post of earlier (sorry
about that) by doing some community service. How? If you’re working on a
big project, *especially* with partners (later on), a version control
system is just what you need.
CVS (Concurrent Versions System, not cyclic vomiting syndrome) is a
system that manages code. It has several uses, but those relevant to our
projects are:
— CVS keeps track of every file change you make, and can jump back
to any version of a file. It does this by keeping logs of how you
change files, thus saving a lot of space (one copy of a file with a list
of changes instead of multiple copies) and helping gobs when you’re
trying to figure out why your latest version broke.
— CVS is already on the Soda servers, so using it to manage your code
means your code is in two places at all times, on the Soda servers and
your laptop. You drop your laptop and corrupt your project 2 hours
before the deadline – its okay! Run to the nearest linux box and check
out your code.
— Many IDEs plug straight into CVS, and will manage your code and your
CVS repository for you almost out of sight. Emacs has a context menu
that appears when you’re working in a CVS-managed directory. Eclipse
integrates very well also (and there is an Eclipse plugin for C editing!
If you’re running EMACS and hating it, check out
http://www.easyeclipse.org/site/distributions/cplusplus.html)
— CVS also does a whole lot of fancy teamwork features, so that
several people can work on the same file/project, and when you commit
your changes to the server, it will show you what changed from your
version to the current version on the server, show any collisions (place
where you edited code that was edited in the meantime by someone else)
and a whole list of cool stuff.
— CVS allows you to “branch” your code – save the point you are now, call it something else, work on it and experiment, and either “merge” the changes back into the repository, or abandon it. Great for experimentation!
OK, so hopefully i’ve convinced you that CVS is a good thing to have.
There’s many alternatives, and CVS is not the newest (Subversion is the
CVS “replacement” but since CVS is already on Soda’s boxes, roll with it
I say.)
There’s a couple of steps to getting everything set up. The big picture
is this:
1. Create a repository on a server somewhere with SSH access. We’ll do
this with your handy home directory in Soda!
2. Import your current projects. BACKUP YOUR DATA BEFOREHAND SO THAT YOU
CAN SCREW UP AND START OVER!
3. Export your newly imported projects so that the folders gets little
“CVS” subfolders that identifies them as being managed by CVS
4. Understand the checkout-edit-update-commit cycle (without the update
in the case when there’s only one person working on one computer)
5. Get your IDE to work with CVS
6. Check in your project as often as possible as you work on it! (This
is a style thing.
So, let’s get cracking.
Setting up CVS / Creating a repository
======================================
Jump into the terminal in soda, hit your home directory (or wherever you
want a “repository” subdirectory) and type “cvs init”. This should take
a couple of seconds, and return with nothing. Check your current working
directory, and there should be a “repository” subdirectory. Yay, CVS
is ready to go!
You want to set up your environmental variables so that there is a
“CVSROOT” variable pointing to this repository directory. This helps CVS
to know where it should create its database. I set up my environmental
variable inside .bashrc in my home dir, like so:
setenv CVSROOT /home/cc/cs61c/sp07/class/cs61c-xx/repository
This doesn’t work when you SSH in (i dont have the skillz or the time to
look up the right place
) but yeah, put it somewhere! All that this
does is you don’t need to type “-d
commands. More on this later! The point is, you want to know where your
repository is at.
Importing current projects
===========================
So, presumably you have some code somewhere that you want to put into version control. For example, you just copied over the fresh fresh code from ~cs61c/proj/01 or something. Let’s quickly talk about some terminology:
* import = insert files as a new project into CVS
* checkout = create a project on your harddrive, fresh from the latest files on the server
* project = a base directory of a directory structure that is managed by CVS
* commit = write the files you changed to the server
* update = updates your local code to reflect the server’s latest code
these are the basic 4 things you’ll be doing. So lets look at command structure:
cvs import -d
or, to make it easy
cvs import -d ~/repository proj1 proj1 initial
do that now with your project. You’ll get a nice output telling you how you just imported a new project and all the files that goes in.
Now *MOVE THIS CODE AWAY*, you can even delete it. I like to keep it somewhere else until i know that i’ve got CVS working right..
CHECKING OUT A PROJECT!
Now, to let CVS manage this project you just imported, check out the project to your workspace.
cvs checkout -d ~/repository proj1
now it’ll spit all the files back out (hopefully!) and when you take a look, there’ll be a CVS subdirectory.
go ahead and be productive, edit and go wild!
CHECKING IN FILES AS YOU EDIT
=============================
I like to check in fairly often. As in, once every 30 minutes to about once every couple of hours. When you’ve made a significant change, its definitely a good idea to commit. And if you want to experiment, use commit a lot, and read up on branching.
To commit your newly saved files:
cvs commit -d ~/repository -m “message for this commit”
IDE STUFF
=========
Emacs has a bunch of keyboard shortcuts, and Eclipse allows you to check in projects from CVS directly into the workspace. You can, of course use the shell as always.
GETTING BACK OLD VERSIONS & COMPARING VERSIONS
==============================================
So let’s say you just broke something in your code and you want to look how it differs from earlier, or you want to replace it with an earlier version of the file. Eclipse does this great. Also, you can see the differences between revisions:
cvs -d repository-location diff [[-D date] || [-r revision_nr]] [[-D date] || [-r revision_nr]].
Thus, you can say. compare my current version with some other version or date. CVS works on a 1.1.1.1 versioning system, and when you check in the version automatically increases.
MORE MORE MORE?
===============
There’s a LOT more to CVS, but this should be enough to get people running. I’m also falling asleep on the keyboard – this project is taking up a lot of time – so good luck to everyone!
Yes indeed, Rails 1.2 is officially out. My gems are updating as we speak, and Agile Web Development with Rails Second Edition should just about be in the mail
The concepts of REST (Representational State Transfer) that technically seeks to model web sites as a state machine is the new hot thing for the Rails community, which means the focus is all on resources that can be accessed through simple GET and POST methods to a set of simple controllers.
This is a very vague incomplete description, but that is one of the big effects of going the REST way, which is what Rails is doing. I like the idea for its abstraction – data, with a layer of “views” built on top of it, with simple intuitive access to these views. There’s a whole bunch of cool things going on, and instead of me babbling about it (dude… it’s still downloading!), read what the core people are saying.
In other news, what’s Google up to… Would you believe me if you say that Google could possibly become bery much THE INTERNET? Read Cringely’s post on Google’s Fiber control, its interesting!
Its only been two days and i’m already up here in the RadioAstronomy lab trying to figure out how 21 units appeared on my schedule… CS61C, Physics 7C, EE120, EE40, Astro 121, IEOR 190C, Decal… And I haven’t even started at Yahoo! Good thing, because in the next week I’ll have to wittle down that list of 7 classes to a much more managable 5… hold on… make that 6. 17 units. Sounds good. And 10 to 15 hours per week at Yahoo. That should leave Friday nights open for some time with my girlfriend. Then again, she’ll most probably be up in Worster working on an architecture project
Life is good eh?
Ok, now not to get too much into going on about my personal life (which is exceptionally great at the moment), I’ll get to what I DID want to talk about. I walked into the RadioAstro lab today and ran into the local tech/engineer guy Jonah and a guy named Andrew (another student), busy tinkering with a little AMD-based board that they’re hacking to make an Ethernet-enabled sensor box. We had an interesting conversation about using technology and engineering in the astrophysics field, and the Center for Astronomy Signal Processing and Electronics Research (CASPER) came up, directed by Dan Werthimer (of Seti@HOME fame). I haven’t heard of them before, but they’re doing some awesome stuff! Taking the tools that Engineering teaches and applying that to the sciences. A very worthy cause in my mind!
I’ll say more later, but right now we need a program to capture some telescope data. w00t!
| I had a wonderful break in Yosemite, where I spent two days learning how to snowboard at Badger Pass. I'm hooked! Its an amazing feeling to have control of your board and zoom down the slopes!
I also cross-country skied out to Glacier Point. We covered just over 10 miles our first day, which HURT! Its beautiful to get out and leave civilization behind on your cross-country skies though – those of you whole always end up spending days on end with the crowds on the slopes should try it out. Bliss! Its also now almost the start of the next semester. I'm hoping to focus this blog on my programming and design/development during this semester – I'll be doing micro circuitry in EE40, C, Assembly and MIPS in CS61C, and web development for Yahoo! Sounds like a fun-tas-tic semester! |
|
I was slightly shocked to, on this bright Christmas morning, find this article on Reddit.com:
Almost 70 years after George Orwell created the all-seeing dictator Big Brother in the novel “1984,” Britons are being watched as never before. About 4.2 million spy cameras film each citizen 300 times a day, and police have built the world’s largest DNA database. Prime Minister Tony Blair said all Britons should carry biometric identification cards to help fight the war on terror.
Blair said citizens have to sacrifice some freedoms to fight terrorism, illegal immigration and identity fraud.
“We have a modern world that we are living in, with new and different types of crime,” Blair said Nov. 6 at a press conference in London. “If we don’t use technology in order to combat it, then we won’t be fighting crime effectively.”
End of the Free World, huh? Indeed it seems like it! There’s no “My Privacy” on Britain’s Camera System! There’s a drastic difference between information you choose to make public (Facebook, Myspace, Flickr, etc etc) and forcible control by the Government!
Read the article at Bloomberg
Tag Clouds are pretty sweet and they are the hype in the AJAX generation, but too much of a good thing ends up doing nothing… I wasn’t sure what to make of zaads.com when I logged on… This is a serious overuse of this design pattern:
Yesterday night the Leonid meteor shower peaked, with up to 100 meteors entering the atmosphere per hour. I ended up watching (but mostly talking about the state of cosmology and the theories of the expanding universe) from two spots up on Pagemill road in the Los Altos Hills. We counted 5 meteors amongst the 4 of us, making a pretty good average for spending only about an hour seriously watching.
Look out for when the next meteor shower is coming your way, its a great reason to grab a flashlight, a blanket, and some friends, and go out there to discover the universe!
We are, quite directly, The Universe’s way to perceive itself. Get to it!
I was extremely shocked today to watch the video of a UCLA student screaming out in pain as he is repeatedly tazed by the University of California’s Police Department when he did not immediately comply with their demands that he leave the building. Although I do agree that the student overreacted when the police demanded that he leaves, I can see no evidence of a physical danger that he posed, and the the response from the police was neither humane nor calculated. It is sad to see that the authorities who are responsible for the students that will form the next generation of leaders in the USA act in such brash, trigger-happy ways. The initial press article is here (“Student shot with taser by UCPD“) as well as a follow up (“Community responds to Taser use in Powell“).
It is very ironic to note that UCLA just awarded a “Meritorious Service/Taser Award” to their officers for “subduing a patient without harm after he threatened staff at the Neuropsychiatric Hospital”. It sure seemed that these officers thought they had the perfect opportunity to be awarded the “Angry mob/Taser Award”. I can only hope that I do not find myself in a situation where this is happening, because chances are good that people at Berkeley will step in more forcefully that the onlookers at UCLA, since there is still strong feelings of “protecting” our legacy from the Free Speech Movement.
I would say more, but I do not feel safe to express any other opinions that I already have.
Now having earned the title of “Hacker” in an official competition by Yahoo!, I probably need to put into perspective what I do as a hacker… I mash existing services together in creative ways they were not necessarily made to fit together. Notice that there is no criminal activity involved! The “Criminal” connotation with the term “Hacker” is mostly a by-product of the (as is too often the case) misrepresentation in the media of seemingly similar but ideologically completely separate groups.
A great paper on this was written by my old professor Brian Harvey! Read up on his view of “What is a Hacker”, and “Computer Hacking and Ethics”.
In the meantime, I hope I survive this week!
Stay well and stay strong!
For the 36-hour period between Wednesday morning, November 8th, and Thursday evening November 9th, I happily hacked away at “The Schedulator” – my hack for Yahoo!’s university hack day. My concept was extremely simple – mash together Berkeley’s online schedule of classes with Yahoo!’s calendar. Why? Frankly, I’m sick of picking classes using Berkeley’s Web 0.5 interface (schedule.Berkeley.edu), and then going through a 30 minute process (if I’m really fast) to import all these details into my Palm Pilot / Google / Yahoo calendar. And if you have all three of those, expect it to take 3 hours to get that scheduling information everywhere. Cmon, what’s the digital age about, wasting time? So! A purely utilitarian hack to a very much pressing personal problem – save some time and import your schedule into Yahoo!’s calendar with a couple of clicks (don’t forget the sweet AJAX!)
My hack involved a lot of screen scraping – until Yahoo! releases their Calendar API (which I discussed with Jeremy Zawodny) I will stick with Ruby’s WWW::Mechanize and good ol’ net/http. This makes any hack very unstable, unfortunately!
Berkeley (to prove that they, although they claim to be number one, falls just short of the mark) ended up having no hacks submitted on time – yes, not a single one. I contacted Yahoo!’s reps beforehand, explaining that my dearest Physics Professor (who rocks btw) scheduled a midterm right through hack day presentations, and can i please come over to Stanford to present?
Everything worked out nicely, and I ended up winning a nice big check for first place! Very impressive, considering that my hack demo ended up with a nice big Exception error message! Stanford’s firewall screwed over my WWW::Mechanize hack (which was completed around 5am… might explain that!) and I couldn’t import the data into Yahoo!’s calendar. All in all I proved my concept though!
SO, what did I learn in this process of a Yahoo! Open Hack Day and the University Hack Day?
- Presentation is key. If you can’t demo your hack, you probably won’t get far. On the same level, a good demo is worth as much as a good hack!
- Hack something different. Yes, this is very logical – duh! And my hack did not even satisfy this – its a very straightforward app, nothing “wow!” – but its worth thinking long and hard about what idea you want to show.
- Don’t be afraid to do anything! In contradiction with above, don’t sit around waiting for the perfect hack, just hack it! You will be surprised with what you learn
- Collaboration is great. Team members, friends, fellow programmers, what have you – they make the whole process much more fun and much more creative!
- network network network! The people you meet and the people you know can help you and guide you, so make contacts, get their cards, email and visit!
- Ride the wave. This Web 2.0 thing is still new to developers at the college level. Ride this wave while you still have lots of space on the waters!
OK, that’s all I can think of now. I won’t say too much about how disappointed I am with Berkeley’s response to this awesome event, and that I’m pleasantly amazed by Stanford’s nice people and (since i’ve been there many times) sweet sweet campus.
All in all, The Schedulator, written in Rails, will become part of thecafetable.com soon enough!
After reading the recent blog of David Heinemeier Hansson about critiquing, I started thinking of what TheCafeTable will really mean once it goes public.
So far we as developers – Rohit, Nadeem, Gleb and I – have had a reasonably productive and stable “professional relationship”. We’re all buddies, and on top of that we’re doing this project together. We all have slightly different reasons to do it, and each of us probably sees a different part of the project. Still, the criticism and disagreements that came up so far has not been from outside pressure, but from our own views of the final product, our haste to get it done, our various skill levels with the technology involved and endless frustration with certain services we’re trying to use. This means that once I get into a disagreement with one of my partners, it usually comes down to an issue of either the differences in what each of us wants, or what each of us deem as possible. The latter is normally very easy to resolve. Prove why a certain idea would take too long, be too hard or is technologically or socially unfeasible. The former takes more time and more understanding and/or communication, but so far I have found it possible to state my views, listen to the other parties involved, and find a compromise or reasonable answer.
A whole new dimension of criticism will open up the moment we allow our little pearl (to paraphrase Hansson’s blog) into the big open seas of the Web. We will all receive positive, neutral and negative criticism, and this will probably place strain on how we are involved with the project. No wonder developers often hide behind a corporate, press-pleasing shroud!
In response to this criticism, I see the following ways to cope:
If you go through this list, you’ll probably notice that I deliberately ordered it – the easiest thing to do up to the hardest thing to do. Face it, criticism hurts like hell, and being able to take a person’s criticism, extract the useful information and then change your product (or yourself) is the ultimate double-whammy of personal strength. You’ll also notice that this corresponds well with Hansson and Dan Russell‘s arguments.
So what would do I now expect, and what do I hope to see happening?
We will definitely receive criticism (and it being our team’s first app, I expect a whole lot, with a fair share of negative comments!).
First off, I hope we can distance ourselves from the project enough that criticism on the project has no relation to ourselves – a “professional detachment” I would call it. This is quite different from not caring, which is definitely not what we should strive for, but rather an outlook that keeps TheCafeTable in perspective as a fun, hacker-ish adventure, not a life-endowing personal achievement (slash failure!)
Then, I hope to see that each of us takes as much criticism as they are comfortable with, pulls this apart to find the good ideas in the criticism (if there are any), and share as much as possible with the rest of the team.
Then, we each should be completely comfortable by stepping back and disregarding criticism when necessary. If you are not in the mindset or do not what to absorb some outside person’s opinion on our work for whatever reason, ignore it! I know I don’t enjoy criticism at all – I would go so far as to say I have a low tolerance for negative criticism, and that I usually end up taking it very personally. I will be sure to use the occasions when I’m getting fed up to disregard criticism rather than doom our creativeness because of a person’s comments on it.
Lastly, I hope to see that all of us define a strong classification between criticism we as team members give to each other and criticism from the outside, and keep these two related but separate. If we can keep up the process we’ve been using so far, and improve our mutual criticism on each other by posing ideas we gleamed from outside criticism, we might just have a winning strategy. On the other hand, becoming a proxy for outside criticism will probably serve to amplify some member of the general public’s voice into a driving force within our team. Somehow this seems very very unwise! If we put up a mutual front to process, assimilate and use criticism, we will grow through it, instead of allowing criticism to damper our creative process and cause friction inside our team.
In short…
Sometimes, your product is going to passionately piss people off. Sometimes, thatÂs okay. In many cases, you simply canÂt design a product that will make everyone sing your praises and want to send you roses. I love my iPod, but I know there are some people who think itÂs devil spawn. If Steve canÂt get everyone to love his things, IÂm not sure I can. -Dan Russell
Yes, it’s preferable if you can develop enough distance from your work to accept criticism like the best of them. But it’s not a skill worth pursuing at the expense of creation.
So if you have to choose, at least in the short term, I hope you pick to shield rather than to run. Mark your work a pearl, reject requests for diamonds. I desire your creation more than I care for the privilege to criticize it. -David Heinemeier Hansson
I found a couple of photos taken during last summer in San Francisco. I was fortunate enough to discover the transbay bus that runs from right in front of my apartment in Berkeley into the heart of San Francisco, and one of the perks of being a UC Berkeley student is free transport on any AC transit bus. I made use of this service frequently!
What fun in SF:
In my traversing of other people’s del.icio.us accounts i happened across something that looked interesting – “How to install Linux on a bootable USB drive”. Since my Physics midterm is over, why not grab the USB drive and have some fun?!
The installation was completely seamless, took me about 10 minutes (including download time, the 50Mb download took a while), and the instructions was easy as pie. The distribution of linux is called “Damn Small Linux” and is based on Knoppix. It is absolutely amazing to see what they fit into 50Mb! Really, there’s a full X-windows manager, firefox, pdf readers, office products, databasing, all the tools below the hood that you need.
I booted it up as a virtual machine (this first i’ve ran on this laptop) and Linux is now a nice window alongside Firefox and Yahoo! Widgets. Check it out:
This seems like a great way to have Linux and Windows working interchangably – thinking of web development, working on the front end in photoshop and the like, and still having a linux windows to pop into and do some real coding work will be great. The performance seems pretty sluggish at the moment, but since it is a stock install and Windows only gives it about 125 Mb of RAM and almost no processor access, that is to be expected until i tune it up.
I’ll get back on this, but in the meantime, grab an old USB stick and say yes! to Linux!
What a day! Berkeley’s Professor George Smoot, the much feared Physics 7A/7B professor who gives impossibly hard exams now has a good solid reason for his behaviour! He just won the nobel prize for his work in cosmology. He was one of the main scientists working on the background radiation problem, and he was the leader of the COBE project, which launched a satellite and mapped out the irregularities in the background radiation. His work laid the groundwork for proving the Big Back theory. All this happened just the day before he’s going to scorch his students with a midterm for Thermodynamics! Congratulations Smoot!
Yahoo’s main offices are empty, silent and exhausted after an intense two days of excitement! The hackers are heading home, the wireless network is going down, and the winners are basking in glory.
And the winner is???
Audrey, Diana and Emily’s Blogging in Motion!
Congratulations girls, you did a fantastic job and you really exemplified the spirit of Hack Day! It was great to spend some time hacking together!
Blogging in Motion!
Media galore!
Where’s all the cool photos of the event? WHERE?
I’m still asking myself this as well, but do look at the Flickr Group for Hack Day and look out for the tags hackday06 and yahoohackday. I’ve also posted a bunch on the flickr page. Also, ABC7 and CBS5 has news coverage of the event.
Check it out, there we all are live from a purse cam!