Samuel’s HQ

A french/american blog with some hungarian spices…
  • rss
  • Home
  • Resume
  • gallery
  • Contact Me

My Alphabet question for interview

April 18, 2007 | 12:01 am

Part of my job is to sometimes give interviews for people we want to hire. One of my favorite question is to ask the person to write a problem that will print the alphabet on the console. So let’s say I have a c file my_program.c, I want to be able to compile it, execute, and get the alphabet on the console. Something like: $./my_program
a
b
c
...
z

I really like this question as I think it’s easy enough to know if the person is able to write a simple program in C. I will post here the several code I got… and sometimes it’s really surprising.

What do you think about the question? Do you think it’s a dumb question? Is it too hard/easy?

Comments
2 Comments »
Categories
Alphabet Interview, English, geeky

Comments rss Comments rss
Trackback Trackback

Le lien du jour qui dechire!

April 14, 2007 | 7:18 am

Comment repasser sa chemise… (132 hits)
Merci ra7or!

Comments
No Comments »
Categories
Francais, general

Comments rss Comments rss
Trackback Trackback

29% of the U.S.A…

| 7:04 am

15 states, so 29% of the U.S.A. That’s much better than for the world…

create your own visited states map (138 hits)

Comments
No Comments »
Categories
English, general

Comments rss Comments rss
Trackback Trackback

Only 4% of this world…

| 7:02 am

That’s on much I saw about planet earth….

create your own visited countries map (115 hits)

I cannot wait to have even more vacation to visit the rest :)

Comments
No Comments »
Categories
English, general

Comments rss Comments rss
Trackback Trackback

Seulement 4% du monde d’explore…

| 6:58 am

Il me reste 96% du monde a decouvrir….

create your own visited countries map (115 hits)

Comments
No Comments »
Categories
Francais, general

Comments rss Comments rss
Trackback Trackback

Bulk replace with perl

April 7, 2007 | 3:58 am

There is a very cool set of options in perl that allows you to replace a string in a file.

perl -pi -e ’s/str1/str2/g’ file

and when you need it for a full directory, it becomes even more powerful

for i in *; do perl -pi -e ’s/str1/str2/g’ $i; done

And the ultimate option, perl -pi.bak [...] which backup the old version of the file with the extension “.bak”.

I knew this option since a while, but I never remember it… so when I need it, I always have to look right and left to find it again… Now it’s blogged!

Comments
No Comments »
Categories
English, geeky

Comments rss Comments rss
Trackback Trackback

Pourquoi un blog…

April 6, 2007 | 9:03 am

Les blogs occupent desormais une part non negligeable de l’internet. Pour etre honnete, je n’y ai jamais cru… Au debut je trouvais que le blog etait un outil pour les personnes incapables de faire un site web… et mon cote geek me laissait penser que ces personnes n’avaient pas leur place sur le net…

Apres ces quelques annees, je me rend compte que j’etais dans le noir absolu, et je me rejouis de voir cette explosion de blogs.

Alors pourquoi aurais-je un blog? effet de mode? ou il y a-t-il un interet?

Certes l’effet de mode a peut-etre joue dans ma decision, mais c’est surtout une conversation avec un copain qui m’a pousse a me lancer (il se reconnaitra :)). Il m’a fait realiser que j’avais des connaissances que je pouvais partager avec un plus grand nombre que les seules personnes de mon quotidien… et le meilleur moyen de le faire c’est de blogger.

Je pense que la section anglaise sera plus orientee “geeky” alors que la section francaise sera plus orientee sur mes reflexions sur certains sujets.

Bonne lecture…

Samuel

Comments
No Comments »
Categories
Francais, general

Comments rss Comments rss
Trackback Trackback

Coup de gueule sur les impots…

| 8:51 am

Ca y est… c’est arrive… c’est le moment de faire son “tax return” pour les personnes vivant aux USA. J’ai repousse l’echeance depuis le debut de fevrier, mais la j’ai du m’y mettre… et paf… je dois payer. Franchement quel sentiment d’injustice que d’avoir a payer des impots… Ok c’est normal d’en payer, mais il n’empeche qu’au moment de faire le cheque… on se sent un peu radin.

Comments
No Comments »
Categories
Francais, general

Comments rss Comments rss
Trackback Trackback

Read Line ‘n’ of a file with sed

April 4, 2007 | 7:52 pm

sed has some options that are not really known, but that are so useful

Print line 10 of a file:

sed -n 10p file

Print last line of a file:

sed -n \$p /etc/passwd

Print every other lines:

sed -n 1~2p /etc/passwd

And much more… So sometimes it’s interesting to RTFM :)

Comments
No Comments »
Categories
English, geeky

Comments rss Comments rss
Trackback Trackback

Navigation

  • English (67)
    • Alphabet Interview (4)
    • fun (4)
    • geeky (14)
    • general (23)
    • perso (1)
    • read on the web (9)
    • Skydiving (8)
    • vim (1)
  • Francais (17)
    • Geeky Linux fr (1)
    • general (14)
  • music (1)
  • photos (1)
  • video (2)

Tags

datacenter food hacking info health makerfaire office productivity san francisco security spam tip tip of the day word

My Bookmarks

  • Chojin’s Quarter
  • Happycoders
  • Kamih’s Blog

My websites

  • My Flickr gallery
  • My Gallery

Archives

  • November 2008 (2)
  • August 2008 (1)
  • July 2008 (1)
  • June 2008 (1)
  • May 2008 (1)
  • April 2008 (2)
  • March 2008 (3)
  • February 2008 (1)
  • January 2008 (2)
  • December 2007 (3)
  • November 2007 (5)
  • October 2007 (9)
  • September 2007 (3)
  • August 2007 (5)
  • July 2007 (6)
  • June 2007 (3)
  • May 2007 (11)
  • April 2007 (9)
  • January 2007 (2)
  • May 2006 (1)
  • March 2006 (3)

From my Google Reader

Live Photos

www.flickr.com
Samuel's photos More of Samuel's photos

Tools


  Subscribe in a reader


View Samuel Pasquier's profile on LinkedIn

google page rank
rss valid xhtml 1.1 design by jide powered by Wordpress