Three columns layout without table

February 8th, 2008

Computer monitors are getting bigger and bigger, so do the html pages. People start to add more columns into the layout.
To create a three columns layout, in a very traditional way you can do it in a table, like this:
[html]

Left Main Right

[/html]
There are some obvious downside on this:

  • Mix data and presentation
  • Not browser friendly, try to browser this use a mobile phone? I am not saying iPhone or iPod Touch.

So how to fix it? You can use css with “position: absolute;” or “Float”:
[html]

Left column
Right column
Content

[/html]
[css]
#wrapper {width: 800px;}
#main {margin-top: 10px;}
#sideleft {float: left; width: 200px; border: 1px solid black; background-color: #dddddd;}
#sideright {float: right; width: 200px; border: 1px solid green; background-color: #99ff99;}
#content {border: 1px solid blue; background-color: #9999ff; margin: 0 20px 0 10px;}
[/css]

Want to know more?

English ,

Find your ideal Career

February 8th, 2008

An ideal career is a sweet dream for most of us, well, maybe all of us.

Changethis.com posted a very interesting manifesto from Jessica Hagy: Indexing a Career: A Career Path in Pictures. You can download the free e-book from Changethis.com and can buy a print version too.

Jessica Hagy has a very unique blog called  Indexed. She posts a picture of her draw on a 3” by 5” index card pretty much everyday. Those pictures are all very simple but inspirational.

Some cards from her manifesto:

Always. Everyone. Everywhere.

Time to what?

I remember I collected a interesting one for ideal career too, so I find it out and put it here:

(Click on it to get the full size version)

English

links for 2008-02-07

February 7th, 2008

Links

Fizz, buzz, fizzbuzz

February 6th, 2008

I was hit by a simple question today: write a fizzbuzz in ruby. Pretty fun anyway.

What’s Fizzbuzz?

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

I started from this:
[ruby]
class Fixnum

end
[/ruby]

I think it was a little overkill and slow the coding speed a lot. Here is the result:
[ruby]
def fizzbuzz
(1..100).each { |item|
puts print_value(item)
}
end

def print_value(item)
print_value = ”
print_value += ‘Fizz’ if item.div_by_3?
print_value += ‘Buzz’ if item.div_by_5?
print_value.empty? ? item : print_value
end

class Fixnum
def div_by_3?
self % 3 == 0
end

def div_by_5?
self % 5 == 0
end
end

fizzbuzz
[/ruby]

Here are some simple samples from internet:
One liner:
[ruby]
1.upto(100) { |n| puts n % 3 == 0 ? n % 5 == 0 ? “fizzbuzz” : “buzz” : n % 5 == 0 ? “fizz” : n }
[/ruby]
Another one liner:
[ruby]
puts (1..100).to_a.collect { |i| i % 15 == 0 ? ‘fizzbuzz’ : (i % 5 == 0 ? ‘fizz’ : (i % 3 == 0 ? ‘buzz’ : i)) }.join(’ ‘)
[/ruby]
One more one liner
[ruby]
puts (1..100).map{|i|i%15==0?’FizzBuzz’:i%5==0?’Buzz’:i%3==0?’Fizz’:i}
[/ruby]
Regular one, pretty close to mine:
[ruby]
(1..100).each{|i|
x = ”
x += ‘Fizz’ if i%3==0
x += ‘Buzz’ if i%5==0
puts(x.empty? ? i : x);
}
[/ruby]

Want to know more?

  1. Coding Horror:  Why Can’t Programmers.. Program?
  2. Imran On Tech: Using FizzBuzz to Find Developers who Grok Coding
  3. Wikipedia: Bizz buzz
  4. RubyQuiz: FizzBuzz (#126)

Go back to practice more, and more…

English, Ruby

links for 2008-02-06

February 6th, 2008

Links

恭祝新年快乐!2008万事如意!

February 6th, 2008

过年了!新春快乐!恭喜发财!

China, 中文

DemoCamp Toronto 17 is open to register

February 5th, 2008

DemoCamp Toronto 17 will be hosted in Toronto Board of Trade, 1 First Canadian Place again on Monday, February 25th, 2008.

It is open to register now. Please hurry up to get your ticket from http://democamp.eventbrite.com/

If you can’t make it this time, please come back here later. I will cover this event for sure.

What’s Democamp Toronto?

DemoCamp is a variation of the un-conference style of event, started by the TorCamp group as an excuse to have more regular meetings where community members share what they’ve been working on, demo their products, meet others (and share a drink or 3).

What’s TorCamp?

TorCamp is a remarkable community of people in the Toronto area - a community of designers, developers, marketers, PR people, executives, testers, quality assurance specialists, consultants, recruiters, network administrators, business developers, venture capitalists, angel investors, policy analysts, etc. Since the first TorCamp event in November 2005, TorCampers have congregated at least once and often five or ten times a month in conference centers, cafes and parks to share ideas and look for unexpected aha! connections of people and ideas. And it’s not just about BarCamp events: if you look at the hottest things going on in the Toronto Tech community, you’ll usually find a TorCamper among the instigators.

What’s the rule? We have a rule? Yes.

The rules are pretty simple. Demos are 5 minutes. There is generally no Powerpoint for Demos, if there is to be Powerpoint it must be approved by the stewards. Ignite presentations are 5 minutes. They are 20 slides x 15 seconds/slide and the presenter does not have control over the slide advancement. All Ignite decks must be submitted to the stewards before the event.

Should I attend?

  • If you want to know what are the hottest things happening in Toronto Tech community
  • If you want to show some super cool things you are working on

See you there! :)

English, Toronto , , ,

Toronto JUG February 2008 Meeting - Eclipse Mylyn

February 5th, 2008

Just came back from Toronto JUG Meeting, we don’t have meeting for almost 4 month already. I really feel I miss it so much.

Toronto JUG meeting is always a fun event to attend, you will have chance to meet a lot of good Java/J2EE Developers from companies around Toronto.

Today’s presentation is given by Eugene Kuleshov , a software developer whom contributes to several open-source Java Projects, such as ASM, Maven and Eclipse. I’ve seen him giving another session about M2 (Maven Eclipse plug-in) a year ago. He is absolute a great Java Developer!

Today’s topis is about Eclipse Mylyn. I’ve used Mylyn for years, back from it was called “Mylar“. I really appreciate this great plug-in from Eclipse Community. Mylyn is a huge time saver and excellent collaborate framework.

What is Mylyn?

Mylyn is a Task-Focused Interface for Eclipse that reduces information overload and makes multi-tasking easy. It does this by making tasks a first class part of Eclipse, and integrating rich and offline editing for repositories such as Bugzilla, Trac, and JIRA.

Once your tasks are integrated, Mylyn monitors your work activity to identify information relevant to the task-at-hand, and uses this task context to focus the Eclipse UI on the interesting information, hide the uninteresting, and automatically find what’s related.

This puts the information you need to get work done at your fingertips and improves productivity by reducing searching, scrolling, and navigation. By making task context explicit Mylyn also facilitates multitasking, planning, reusing past efforts, and sharing expertise.

This picture is showing what Eclipse will look like after having Mylyn installed.

What features Mylyn provides?

  • Task-Focused User Interface - the interface automatically hides items which are not part of the current task, and keeps track of what items are related to a given task
  • Integration with Task Repositories - draws lists of tasks from Bugzilla, JIRA, and Trac as well as several other providers
  • Rich editing and transparent offline work - automatic caching of task changes, and automatic synchronization when back online

Want to know more:

So, go ahead download it, install it and have some fun!

By the way, every JUG meeting will have some job opening announcement. If you are looking from Java job or Java Developers, it is the event to go too.

Here is the list of this month:

  • RPM is looking from Sr./Jr. Java Developers
  • iLoveReward is looking from Sr./Jr. Java Developers
  • Quest is looking from Sr. Java Developes and QA
  • TEK Systems as always

English, Java, Toronto , , ,

links for 2008-02-05

February 5th, 2008

Links

FacebookCamp Toronto 3

February 5th, 2008

Just came back from FacebookCamp Toronto 3. It was absolutely another great event again!

As you can see here, there were more than 400 people from Toronto or around area attended this camp. Actually FacebookCamp Toronto is the biggest Facebook Developer Garage in the whole world so far. Pretty amazing!

I’ve uploaded all the photos I’ve taken onto FacebookCamp Event page, please check out them here: http://www.facebook.com/photo_search.php?oid=9090547740&view=all

Here is the links to the detail pages:

http://www.facebook.com/group.php?gid=2411884086 (Group)

http://www.facebook.com/event.php?eid=9090547740 (Event)

http://barcamp.org/FacebookCampToronto3 (Agenda and detail wiki page)

The actual agenda was pretty much the same as the wiki one, except Dave’s keynote has been moved after “Facebook vs OpenSocial” as he was stuck in the traffic.

  • Intro - update from last FBCT (Roy/Colin/Andrew)

Facebook gets bigger and bigger, Facebook users in Canada get more and more…

  • Facebook Pages Case Study ( Andrew Cherwenka, Trapeze Media )

Even a Facebook Page can make a success marketing story too!

  • Bebo Facebook Application ( Roy Pereira & Colin Smillie, refresh partners )

First website who has licensed Facebook API. Transferring apps from Facebook to Bebo is not that easy now, but it’s getting better.

“Write once, run anywhere” is not exactly true. Damn!

  • ExtremeVP Introduction (Amar Varma)

I am on Facebook and I am using Mac!

“A lot of big things will happen on Facebook Platform, but I don’t tell you now.”

  • Website Marketing in Facebook Case Study ( Tim Shore, BlogTO )

Toronto Faves and Toronto Events, don’t miss them if you are in Toronto too.

Jay Goldman - Author of “Facebook Cookbook”. Check out his blog for more detail information on Facebook Beacons.

Demos: 5 minutes each ( 5 Slots, no more, see you next time)

Their status is COOL.

3D Scene on Facebook.

From Facebook President to ePresident.

I debate this will be big.

Serious business conference call for free.

What a wonderful time! See you next camp. :)

English, Facebook, Toronto ,