Hacker Newsnew | past | comments | ask | show | jobs | submit | kirkthejerk's commentslogin

I wouldn't trust/believe a programmer who isn't ashamed of something they've done.

In an embedded system, I couldn't think of a nice way to check for the start+end dates for daylight savings time, so I just hard-coded arrays with 10 years worth of dates.

I was eventually surprised to find out that (A) in 2005 the US changed the DST dates, and (B) our system actually survived longer than ten years.


I got some code deep in a system somewhere that parsed dates. There are some limitations to the method, but I figured (and still do) it is pretty low risk.

The comment above that code is // god help us if this line is still being run 80 years from today.


I mixed up the meanings of "debit" and "credit", and wrote a credit card processing app that ended up PAYING $75K to our customers instead of charging them.

I'm still not sure how this bug slipped past the bank's tough app certification process, though.


Traipsing around botanical gardens with my laptop sounds divine, but what if I need (yes, need) a multi-monitor PC and wired network?

If adjustable sitting/standing desks are all the rage nowadays, how about cubicle walls that raise/lower (all the way to the ceiling)? Scrum time? Lower the walls. Need a bit of quiet contemplation? Shields up!

I'll bet that somebody with better time/money/smarts/connections/looks/luck/location than me could get funding for this invention ;)


"Traipsing around botanical gardens with my laptop sounds divine, but what if I need (yes, need) a multi-monitor PC and wired network?"

That's what docking stations are for.

The vertically adjustable cubicle walls sound neat, though.


I got great grades in college, but could never wrap my head around LISP (Lost In Stupid Parentheses). For anything non-trivial, I cheated and handed in somebody else's work.

There, I said it.


I've been writing a book on Clojure, "Clojure for the Brave and True": http://www.braveclojure.com. It's meant to be an entertaining guide which focuses on getting you up and running quickly. It also explains the more novel parts of lisp in a clear, non-academic way.

It's free online and is going to be published by No Starch eventually. Hope you find it useful!


Your book is beautiful! Highly recommend! I very much like your style!

(there are some formatting errors though, like unresolved org-mode symbols)


Thanks :D

I've been trying to find and fix the formatting errors. I think most of them are fixed by now. At least, I hope so!


Strange. I never learned it in college, just on my own for fun, but I've found it to be quite elegant (if impractical compared to better modern languages). The fact that everything is an expression and you can use any expression anywhere makes it very easy to learn, and powerful.

I personally find it more enjoyable to use than things like C. Then again, for one historical reason or another, C-type languages won, and nowadays are the easiest path to making software, since you'll inevitably have to interact with an OS, window toolkit, libraries, etc..., that all have a C/C++ interface...


>> impractical compared to better modern languages

How much did 'they' pay you to say that? :D

But seriously Lisps are by far the most advanced programming languages. They just take a huge amount of effort to learn.


> How much did 'they' pay you to say that? :D

I wish.

Seriously though, most modern languages have Lisp features. Even Java 8 will get Lambdas. Quite a few languages have macros. Many languages have eval and REPLs.

Right now I'm playing around quite a bit with Haxe. Cool language, static typing (w/ type inference), pattern matching, closures, macros, and compiles to half a dozen languages and nearly every platform known to mankind...


Unfortunately I think many people get "Lost In Stupid Parenthesis" because they either refuse to use or are not supplied with the proper tools. Lisp programs are of such an elegant structure form that they lend them selves to highly structured editing tools.

I use CL in my day job and would find it highly painful if I did not have all the editing tools I use. Basic things like auto closing parenthesis; this makes the whole I need to balance my parenthesis issue disappear, coupled with transforming existing symbolic expression.


> I use CL in my day job and would find it highly painful if I did not have all the editing tools I use.

Just curious, what kind of things do you do with CL at work? I'm always interested in how people use less-common languages :)


I love hearing about that sort of stuff too... Especially video games (GOOL and http://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp and https://play.google.com/store/apps/details?id=com.friendlyvi...) and Mars rovers (http://www.flownet.com/gat/jpl-lisp.html) and other things that now are dominated by other languages. With Lisp, I'm always reminded of this quote:

"Please don't assume Lisp is only useful for Animation and Graphics, AI, Bioinformatics, B2B and E-Commerce, Data Mining, EDA/Semiconductor applications, Expert Systems, Finance, Intelligent Agents, Knowledge Management, Mechanical CAD, Modeling and Simulation, Natural Language, Optimization, Research, Risk Analysis, Scheduling, Telecom, and Web Authoring just because these are the only things they happened to list." --Kent Pitman


We do digital optimization

The modelling is done in MatLab but the automated experimentation platform is all CL.


I felt the same way about lisp and always reached for the same acronym when I was in college at UT. 7 years later I'm a huge fan of lisp (CL/Clojure/Scheme) and enjoy writing Clojure whenever I get the chance.

It's hard to appreciate the elegance of the language before experiencing years of pain working with others. I have similar feelings about learning Haskell (and not appreciating it) in college.


I highly recommend buying a copy of Structure and Interpretation of Computer Programs (SICP), downloading Racket http://racket-lang.org, and learning you some Scheme (err, Racket).

I took a class centered around SICP my first term in college, and it was an incredibly enlightening experience.


While SICP is a wonderful book and should be recommended, it is not meant as a tutorial on Scheme. SICP only uses Scheme to have some concrete language to talk about deeper themes. The grandparent might have better luck with a book that is about Scheme.


By contrast, I recall the story of a guy who had the choice between C and Lisp for his programming class, and chose Lisp because he couldn't figure out C.

IIRC Richard Stallman also has a story about secretaries at MIT using Lisp for basically the same reason.


Actually Stallman placed preference on Lisp and C as being his preferred languages.

The quote your referring to is part of his statement exposing the imbalance of the the educational system within the US in the 80's. Here is the quote which also came from the first announcement to his emacs editor under the tag /Blue Sky/:

When large numbers of nontechnical workers are using a programmable editor, they will he tempted constantly to begin programming in the course of their day-to-day lives. This should contribute greatly to computer literacy, especially because many of the people thus exposed will be secretaries taught by society that they are incapable of doing mathematics, and unable to imagine for a moment that they can learn to program. But that won't stop them from learning it if they don't know that it is programming that they are learning!


My prob wasn't really about being lost in parenthesis; I had an editor with bracket matching. My prob was the "inside-out" thinking that LISP requires. It's tricky when you're coming from a BASIC/PASCAL/C background.

I'm a sucker for punishment, so after my first (bad) taste of LISP, I took an AI course that was 100% LISP. My AI teacher studied under McCarthy at Stanford, so I probably can't blame him for anything.


In clojure you have thread macros to solve the “inside-out” problem.

(-> 3 (+ 6) (* 7) (/ 12))

or (just an example, fictional names)

(->> object reflector fields (map :balance) (filter #(> % 1000))

Which reads like (pseudo language)

object.reflector().fields().map(:balance).filter(field -> field > 1000)


Did you try thinking aloud what you were writing? Like, while writing (+ 5 6), saying "Sum of five and six." I found the prefix style a little odd until I started doing that.


I get the impression Lisp tended to be taught awfully, uninspiringly. Maybe even worse than other programming languages. Cheating sounds like a reasonable response to such a farce of "education"; sad to hear when exposure to Lisp is a soul-crushing experience.

I've seen a few old AI books where Lisp code is formatted unreadably. I wonder why.


Georgia Tech, one of the top schools in the US, couldn't even teach lisp. They tried scheme with SICP (IIRC, not sure what else would have been used in 2001). It ended with a major cheating scandal [1]. I was convinced at the time the issue was a lack of understanding on the parts of the TAs. Very few of them had a background in scheme, it was the blind leading the blind according to friends who had started that year (2001, I started in 2000). Since so many students took intro to computing and there were only a few lecturers, the TAs had to do the bulk of the real instruction (that is, non-200+ student lectures). This resulted (at least for a time) in a fragmenting of the introductory programming material, and it leaving the hands of the College of Computing. Non-CS/EE/CMPE engineering students ended up in courses using matlab, without ever actually studying algorithm design/analysis (which is what CS 1311/1321/1511/whatever other numbers they'd used previously) used to cover.

[1] http://www.cavalierdaily.com/article/2002/01/cheating-scanda...


At least as far as I can tell, the problem was that they required everyone to learn scheme, including the non-CS majors.


I don't think that was the problem, but it was a problem. I still contend the inability of the instructors to do their job was the problem. If the TAs had been prepared to teach scheme, and not come out of a year with a background in pseudocode (based on Pascal for CS 1311/1321/1511/too many other numbers) and Java (CS 1312/1322/1512/too many more numbers), but instead had a background in functional programming and scheme in particular, they might have been able to help their students out. That transition period from the pseudocode based intro to computing to the scheme/SICP based course should have been more gradual. Which leaves the ultimate failure on the part of the faculty who decided on an abrupt transition for their students, and ultimately failed the students in the process.


The Little Schemer is think is one of the most inspiring ways to learn. Truly a book every software engineer should enjoy.


The sequel books are also work looking at (The Seasoned Schemer, The Reasoned Schemer).


Yay, I don't have to use ctrl-K codes like the original TP3 editor!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: