Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about linux (old posts, page 8)

Teaching and money

I have been teach­ing for al­most my whole adult life.

My first re­al job was teach­ing as­sis­tan­t. I worked in a uni­ver­si­ty for 10 years.

Then I start­ed teach­ing Lin­ux train­ning cour­ses for di­verse com­pa­nies (think LPI kin­da stuff).

Then I stopped. Why? Be­cause it makes no sense eco­nom­i­cal­ly to teach in most cas­es.

The fol­low­ing is writ­ten in pe­sos, but the idea is prob­a­bly about the same for oth­er coun­tries.

There are no mon­ey signs beause chee­tah tem­plates hate them ;-)

A train­er is paid about 35 per hour. If he's pret­ty good, he gets 50.

A course is about 24 hours, so he gets about 1200 (I am go­ing for the best case sce­nario here).

Usu­al­ly he has be­tween 6 and 12 stu­dents, which are charged about 900 + tax­es, so the gross is av­er­age 5500.

Of that, half (or a lit­tle less) goes to the class­room ren­t, leav­ing about 3000 for the train­ing com­pa­ny.

Pay the teacher, and you have a rather pa­thet­ic amount for the train­ing com­pa­ny that pays over­head, sales­peo­ple, tax­es and what­ev­er.

So, who makes any mon­ey out of this? The class­room renters :-P

So, if youa re go­ing to work on train­ing, please don't rent class­room­s, it makes no sense.

Now sup­pose you have a con­sult­ing firm and you can do on­site train­ing (at your clients), and just pock­et the mon­ey.

If you have just three stu­dents, you need no fa­cil­i­ties, you can charge slight­ly high­er, be­cause its on­site.

It's the same ef­fort for the train­er, be­cause you just change where you com­mute to (train­ing cen­ter vs clien­t).

Since you can make more mon­ey with small­er class­es, you can still charge a lit­tle high­er (more per­son­al­ized at­ten­tion).

Since the stu­dents are all from one com­pa­ny they have more in com­mon and you can struc­ture the teach­ing bet­ter, which makes it way less bor­ing.

So, if you want to make a liv­ing teach­ing, here's how.

  • Mar­ket di­rec­t­­ly to com­­pa­nies, for on­site train­ing.

  • Have your own ma­te­ri­al­s.

  • Be flex­i­ble.

  • Buy your own class­­room if you have to.

And most of al­l, don't wor­ry. It's pret­ty much im­pos­si­ble to lose mon­ey train­ing, un­less you open a ex­clu­sive­ly train­ing com­pa­ny.

Rant: The problem with expensive linux

I al­ways liked SuSE's Lin­ux dis­tros. They even used to mail me a box ev­ery now and then when there was code of mine in it. It al­ways seemed nice­ly done, and well in­te­grat­ed. Of course I on­ly used it as a work­sta­tion.

Re­cent­ly, I had the dis­plea­sure of in­stalling a SLES9-based serv­er for a clien­t.

I say dis­plea­sure, be­cause it was by far the worse ex­pe­ri­ence I had with any Lin­ux dis­tri­bu­tion ev­er. It was worse than the time I had to in­stall openl­dap on a P2 with gen­too that was con­nect­ed to the in­ter­net over a 56k di­alup and had on­ly 100MB of free disk space.

And that one was a scream­er!

What were the prob­lem­s?

Well, for starter­s, it was a pun­ish­ing throw­back to the times of pro­pri­etary soft­ware in­stal­la­tion.

I in­stall it. Ok.

I try to up­date it. Not Ok.

The prob­lem? You need to au­then­ti­cate to the servers in or­der to get the up­dates. And there is no user/­pass­word any­where in the box. You have a se­ri­al num­ber (in a word file in­side a CD, not on a stick­er), and no ex­pla­na­tion on how to go from one to the oth­er.

It turns out you have to call Sup­port to get the auth data, and that de­pend­ing on how you do it you get da­ta that lets you ac­cess to the nov­ell servers or the suse servers (and not the oth­er).

Then, af­ter we got that (48 hours on tech sup­port­), I start in­stalling the soft­ware I need.

The mis­sion of this serv­er is sim­ple. It's a mail for­ward­ing serv­er. It han­dles out­go­ing mail, and it stores in­com­ing mail for a few min­utes un­til a CRM soft­ware (in win­dows) grabs it via POP3.

I can do such a serv­er on Cen­tOS, De­bian, (hel­l, yes, even gen­too) in about 2 hours with­out count­ing in­stal­l+up­dates, in­clud­ing mi­gra­tion of old da­ta.

I in­stall post­fix and imapd (I think it's wu-imapd, which suck­s, BTW, but the al­ter­na­tive was cyrus, which was gross overkil­l).

It seems to work. But the CRM can't fetch the mail. Out­look can, though. What the hel­l?

Well, SuSE de­cid­ed to dis­able plain lo­gins for POP and IMAP over non-SSL con­nec­tion­s. And there is no way to en­able it.

Since that's the on­ly kind of con­nec­tion the CRM will do, it will not work.

Mind you, in this case, it is ab­so­lute­ly no se­cu­ri­ty risk what­sow­ev­er, since the mail serv­er and the CRM are seg­re­gat­ed from the user's net­work...

Ok, I will in­stall couri­er-imap, which is bet­ter any­way. But it's not on SLES9 CD­s, and the RPMs on the web are for ev­ery oth­er SuSE and not SLES9. So I had to build it my­self.

That is, of course, be­cause there is no free repos­i­to­ries for SLES9. You have what comes with it, or what you can build your­self. Any­thing else, you are SOL.

The same thing hap­pened for al­most ev­ery­thing I want­ed to in­stal­l. Ei­ther it was not there, or it was for some oth­er SuSE, so it was time to com­pile a RPM again.

It was like Gen­too, on­ly with­out the au­to­mat­i­cal de­pen­den­cies, and with no hope for fu­ture se­cu­ri­ty up­dates un­less I build them my­self.

At that point I was al­ready telling the cus­tomer that maybe I could just in­stall Open­SUSE, which was free and would not have these prob­lems (hel­l, I would even get ap­t4­suse and avoid the damn nov­ell server­s).

Of course that means they would be a few hun­dred dol­lars poor­er for no good rea­son.

But any­way, it took me rough­ly 3 ex­tra days to set this up, which made me ac­tu­al­ly lose mon­ey on the gig. ANd I lost the time in the most pa­thet­ic way, sit­ting in a cus­tomer's of­fice wait­ing for tech sup­port, watch­ing my mon­ey go away.

That had nev­er hap­pened to me be­fore. I must say I am pret­ty dis­ap­point­ed.

But what was the root of the prob­lems here?

  • There is no free SLES clone like Cen­­tOS

If there were, then there would be 3rd par­ty re­pos. The cus­tomer would still have bought SLES9 be­cause they are sup­port groupies, but my life would have been eas­i­er.

Of course, it would prob­a­bly cut in­to SLES sales, but hey, that is not my prob­lem, is it?

  • Nov­ell Ar­­gen­ti­­na tech sup­­port sucks for Lin­ux.

The guy on the phone lit­er­al­ly had no idea what I talked about when I asked about how to get in­to YOU to up­date the box.

But don't wor­ry Nov­el­l, I heard Red Hat Ar­genti­na's is quite bad too.

If you re­al­ly want SuSE, buy a reg­u­lar one, the ones with pub­lic FTP repos­i­to­ries, and avoid trou­ble. Or get Open­SUSE.

Me, I'm pret­ty bummed :-(

Unknown jewels of Unix: NoSQL

I have known about Car­lo Strozzi's NoSQL for about 6 years. I don't think many oth­ers do (it's google score is 39500, com­pared with 81200000 for MySQL) , and I think it's a shame, be­cause it's a much more in­ter­est­ing idea.

What is it? It's a re­la­tion­al data­base.

Sure, I can al­most hear you think [1] , "like Mysql!" or "like Post­gres!" and you are wrong be­cause it's very dif­fer­en­t.

NoSQL is a re­la­tion­al data­base im­ple­ment­ed in AWK and op­er­at­ed via the unix shel­l. Yes, NoSQL is the most unixy RDBMS in the world. So all of you so-­called unix lover­s, shell freak­s, you are gonna love this.

In­stalling it is per­haps a bit hard­er than it should (who knew there are no MAWK RPMs any­more!), but it seems to be packed for De­bian at least ;-)

You can learn to use NoSQL with a nice [2] tu­to­ri­al that was pub­lished on Lin­ux Jour­nal.

The ta­bles are plain text files, and lat­er you can do things like this (from the doc­s):

% column Item Cost Value < inventory |
row 'Cost > 50' | mean -l Value
Item   Cost  Value
----   ----  -----
3      80    400
6      147   13083
7      175   875
----   ----  -----
              4786

Is­n't that cool? What it does is take the in­ven­to­ry table, se­lect over col­umns Item, Cost, Val­ue the rows with Cost > 50, then cal­cu­late the mean of the Val­ue col­umn :-)

It even sup­ports re­port­s, join­s, a bazil­lion things.

Hon­est­ly, I am not sure I can find a prac­ti­cal use for it [3], but it is a great piece of soft­ware, writ­ten by a ded­i­cat­ed guy, it is ex­treme­ly orig­i­nal, and it does work. I'd even say it's pret­ty pow­er­ful, and you must ac­cep­t, it's unixy as all hel­l.

So, Car­lo Strozzi, here's a toast for you and NoSQL. You are cool.


[1] So good is my hear­ing

[2] Sad­ly it's quite old

[3] I did on­ce, but that was when I was a re­al pro­gram­mer ;-)

Xen on CentOS4

Just in case any­one is won­der­ing if you can in­stall the Xen hy­per­vi­sor on a Cen­tOS box:

  1. Sure. It works just fine.

  2. Ok, there are a cou­­ple of glitch­es in the in­­stal­l.

Here's how I did it, on a Cen­tOS 4.2 box:

  • Get the in­­stall script for RHEL 4.1

  • Fix the val­i­­date_os_ver­­sion func­­tion:

validate_os_version() {
    #grep "Red Hat Enterprise Linux AS release 4 (Nahant Update 1)" /etc/redhat-release 2>/dev/null >/dev/null
   true
}
  • Run it

  • Fix your grub.­­conf adding this :

title Xen 3.0 / XenLinux 2.6
  kernel /boot/xen-3.0.gz dom0_mem=262144
  module /boot/vmlinuz-2.6-xen root=/dev/hda1 ro console=tty0
  module /boot/initrd-2.6-xen.img
  • Fix your glibc by do­ing this:

mv /lib/tls/ /lib/tls.disabled
  • Boot on the Xen op­­tion from Grub, and you al­ready have a Cen­­tOS Dom0. Quite sim­­ple, was­n't it? :-)

Main prob­lem: The Xen ker­nel you are boot­ing suck­s, be­cause it sup­ports no un­usu­al hard­ware. So, it would be a good idea to hack a de­cent Xen-lin­ux-k­er­nel sim­i­lar to Cen­tOS un­sup­port­ed one.

Now it's time to start toy­ing with Cen­tOS par­ti­tion­s, but they are sup­posed to be sim­ple.

Small Linux Revisited

A Lit­tle His­to­ry

Many moons (al­most two years!) ago, I wrote an ar­ti­cle called Small Lin­ux de­tail­ing what I had done to make a rea­son­able Lin­ux fit in a Toshi­ba Li­bret­to 50.

That's a very lim­it­ed note­book, with un­der 800MB of disk, a 75Mhz Pen­tium CPU and 16MB of RAM, and it has served me well for a long time.

Now, how­ev­er, I am us­ing the al­most ex­act op­po­site, a sec­ond-­hand Toshi­ba Satel­lite 1955-S805.

Where Salma (the Li­bret­to) had a 640x480 screen, Mon­ty (Toshiba), has a 16" 1280x1024. The RAM has in­creased 32 times. But they have one thing in com­mon....

The 800MB HD

You see, Mon­ty is sec­ond hand. My fu­ture moth­er-in-law and broth­er-in-law brought it from New York when they vis­it­ed, for Rosario (My fu­ture wife, un­til Feb­ru­ary 18 2006 ;-).

And it had a bro­ken HD. And I want­ed to use it while I got a nice new 60GB one.

So, over­com­ing my fear of de­stroy­ing ex­pen­sive equip­men­t, I got the HD out of Salma and in­to Mon­ty, and start­ed think­ing....

The Tallest Guy In The World

He had a prob­lem: re­al­ly bad feet. He died of it, too. In the same way, Mon­ty now boot­ed, but the app se­lec­tion was out­dat­ed, and re­al­ly, lots of things Salma could­n't do, Mon­ty could.

What on earth can one in­stall on that disk when you don't have any oth­er re­al hard­ware lim­i­ta­tion­s?

The choice of dis­tri­bu­tion was trick­y.

I am a Cen­tOS guy late­ly, but the pack­age se­lec­tion is en­tan­gled enough that you can hard­ly get X in­stalled with­out cross­ing the 800M­B. The min­i­mal in­stall is about 450M­B.

De­bian again? Well... no.

Knop­pix?

Now, that has some se­ri­ous po­ten­tial, since I could run the OS from DVD/CD, and then use the whole 800MB for da­ta. But I want­ed some­thing where I could choose what to in­stal­l.

I could have gone the path of one of the mod­u­lar Knop­pix deriva­tives, but it was yet an­oth­er task on the pile.

So, I went with­.... ARCH.

ARCH Is Arch

Yes, ARCH is saucy. It in­stalls in rough­ly 200M­B, in­clud­ing ker­nel sources and GC­C. That's quite smal­l.

I man­aged to cre­ate a rea­son­able desk­top in about 550M­B, in­clud­ing:

Scite:

A nice text ed­i­tor

Python:

Need­ed it to work in a few prog­gies.

Firefox:

I have the RAM. The CPU is a 2.56 P4.

Xorg 8.2 with Nvidia drivers:

And just for kick­s, 3d­desk­top to see if they work ;-)

fluxbox:

I know it, and it's nice enough.

putty:

Nicer than xter­m, and has a handy SSH builtin.

ROX Filer:

Not re­al­ly all that use­ful, but what the hel­l, for 3MB you get side­bars, a file man­ag­er and a few ex­tra trick­s.

Slim:

A very nice xdm re­place­men­t. Spe­cial­ly with the mind­lock theme :-)

upx:

Com­press the ex­es. Save 30M­B. Good.

CherryPy:

It's what I am work­ing with. And it's on­ly 74K­B.

habak:

Sim­ple, small tool to set the X root dec­o­ra­tion.

rsync:

Stay synced with my old­er desk­top.

All in­clud­ed, I am at 120 pack­ages, us­ing 557MB of disk (with ex­ten­sive trim­ming, see the orig­i­nal ar­ti­cle for some ex­am­ples).

So, what's the dif­fer­ence be­tween this set of apps and my pre­vi­ous choice....

Well, look at the re­sult of free:

             total       used       free     shared    buffers     cached
Mem:        512544     408924     103620          0      33468     162916
-/+ buffers/cache:     212540     300004
Swap:            0          0          0

Just for laugh­s: here's the old one, when do­ing rough­ly the same things: edit­ing an ar­ti­cle, brows­ing the we­b, a few ter­mi­nal­s:

                total    used    free    shared   buffers        cached
Mem:            14708   14144     564      4644       816          5304
-/+ buffers/cache:       8024    6684
Swap:           47992   18880   29112

Scary is­n't it? I am us­ing rough­ly 25 times the amount of mem­o­ry I used on the li­bret­to. It's easy to see why, tho.

Con­sid­er the desk­top. It shows a pret­ty pic­ture. It is 1280x1024. It is in mil­lions of col­ors. That is in RAM. That is ei­ther 3932160 or 5242880 bytes. On the li­bret­to, I was in­ten­tion­al­ly not us­ing any­thing there :-)

So, it re­al­ly is not com­pa­ra­ble any­way, and Mon­ty's life as a mal­formed box will be short. But it was quite a bit of fun :-)


Contents © 2000-2023 Roberto Alsina