[ale] I've decided again to learn programming again
Chris Fowler
cfowler at outpostsentinel.com
Mon Oct 17 17:16:57 EDT 2011
On Sun, 2011-10-16 at 00:13 -0400, Michael B. Trausch wrote:
> My point was more along the lines that it takes time to learn how it
> all works even though we have all that abstraction. It's not really
> simple, and it helps to understand that. The better one understands
> how much the abstraction costs, the better code one will write
> (although perhaps not at first; it takes quite a long time to truly
> understand the costs of various things).
>
>
This is VERY IMPORTANT!
Many times I've had to clean up after an "explosion" caused by some JAva
programmer who decided to use some API (abstraction) that caused memory
issues, failed to do what it claimed to do, or you name it.
If you can do it without an API then go for it. If you then later to
choose to use the API after you've tried then that works too.
The problem is when people take the easy path.
Today, I had such a problem. I've got a guy who claims "Linux
Knowledge" but does not understand why he must escape a '$' on the
command line. This is for setting passwords. A customer would like
strong passwords. These passwords must include '!@#$'. The command to
configure a password is 'set user <name> password <password>'. Years
back I added verification so the set command (not bash internal!) will
prompt for confirmation. He has been trying to also put ' around the
verification too! I'm not blaming him but it made me remember that
about 11 years ago when I started down the road I made my own shell.
Wrote it in C. I got tired of adding all the features and just used
bash instead. Seems wasteful, but in the process I learned about the
basics of how shells operate. I told him that I will be loaning him a
book 'UNIX Shells' and he is to read a small part to learn what a shell
does and how it works.
Even in my radio hobby I take the approach of try then buy. Try to
build that antenna and if you want the $400 version later it is okay to
buy it. If you simply buy all you have learned is how to write a
check...
Oh, and on abstraction. XSLT in J2EE is killing me :) So much memory
consumed for such a small task. The original Java programmer who
started this project with me wanted to do db -> XML -> XSLT -> HTML. It
"works" but it will not scale. We've had to do a lot of stuff to our
pages to separate them in multiple pages (lists). I've had to clean out
databases as things get marked as 'closed' and the rows accumulate. Too
much data and you get 500 errors due to the JVM running out of memory.
My vote would be on learning C. Sometimes it can be a real PITA.
Especially if you do not manage your memory usage. It can be fun. I've
programmed C for years and sometimes it bores me, but Arduino has made
it fun again. I learned PERL because I needed a scripted and easy way
to test my C code. We used it in the lab for testing then we moved to
use it in production for some real heavy lifting. If I ever had time I
will rewrite APUE (Stevens) with ONLY PERL examples :) I've tested many
ideas in PERL before writing a single line of C.
Chris
More information about the Ale
mailing list