Tiomaidh

- friends
606 link karma
5,886 comment karma
send messageredditor for
what's this?

TROPHY CASE

reddit is a source for what's new and popular online. vote on links that you like or dislike and help decide what's popular, or submit your own!

10 ways to improve your programming skills by dexter2062in programming

[–]Tiomaidh 2 points3 points ago

  1. Don't learn a language just for shits until you've done something real in your first one. You need to have a deep enough understanding of Language One to appreciate how Language Two is different from it.

  2. Don't read The Art of Computer Programming. You won't finish it--heck, you probably won't get 100 pages into it--and it'll just leave you overwhelmed and sad.

  3. Don't pick an open source project you just find, pick one you use. That said, don't just dive into a huge codebase--if it's your first time make sure it's either a small project or there's a small, mostly-self-contained component you can work on.

  4. Programming puzzles teach you mathy tricks, and won't help software engineering at all.

  5. Yes, program. Please.

  6. Don't read the kernel unless you have significant experience with how they're supposed to work.

  7. It's good to keep an eye on forums and blogs (or just monitor SO, /r/coding, and Hacker News), both to pick up news and tips, and so that you know what you don't know. I've had my tail saved several times not because I knew how to use Technology X, but because I knew that Technology X existed, would probably solve my problem, and was definitely worth investigating for real.

  8. Writing is helpful, and often overlooked. I learned a crapton about Linux by writing ignorant posts on my blog right when I started using it. (In retrospect, I can't believe it got as many hits as it did...)

  9. Unless you're particularly interested, I've found learning low-level stuff is best done with a layered approach. First learn that memory is there and the difference between references (pointers) and actual values. Let some time pass. Next learn a bit more about allocation and deallocation/garbage collection. More time. Next learn about bit operations and such. Time. Then about processors and opcodes and theoretical assembly. At some point you probably should've started to pick up some C. Then get deeper into how stuff actually works in assembly, how common higher-level idioms get compiled down, what the stack is, etcetera. Then OS stuff. At some point you'll go to college and take a systems course or two and get it all formalized. But it's most painless in layers, not as a spike.

  10. You shouldn't post to SO or /r/learnprogramming or what have you immediately. First seriously contemplate the bug for several minutes. If you're cool, use a debugger (otherwise drop print statements, which is great too), follow your flow carefully, check your assumptions about what values things should or should not have, etcetera. Try explaining it all to a duck. StackOverflow probably won't help you with silly logical errors. Then, if you're using a library or module or any sort of third-party code, check the documentation, and try Googling your error messages. You're a redditor, you have some google-fu. At this point, if you're still stuck, the healthiest thing is to do something completely different, preferably not on your computer. Once you come back to it, do a quick run-through of the above again, and then consider actually composing a question on a Q&A site.

Lenovo dumps classic keyboard on new ThinkPad laptops by kmwhitein thinkpad

[–]Tiomaidh 1 point2 points ago

I'm still sad about not having my work T40 any more. Best laptop keyboard I've used in my life by a long shot. I'm typing this on a T60, which has a decent keyboard, but...dang that T40 rocked.

Keyboardwise, T40 > T41 > T60 > T400 > T410, so I'm very worried about this trend (although I have a sample size of one each). And now if the layout's getting screwed over too...sigh.

What is something of yours that you absolutely hate people touching? by Fiasko21in AskReddit

[–]Tiomaidh 2 points3 points ago

What do you drive, a Willy's?

Why not just use lists for everything? by keveamin lisp

[–]Tiomaidh 0 points1 point ago

What are you smoking?

If your program is working with big lists, then maybe it should be using C code, GPU code, or a database

Which is easier: using appropriate data structures in Lisp, or completely switching languages / implementation methods? If I start with plists in Lisp and they get expensive, I only have to change my add, remove, and contains methods; each of which is only a line or two long anyway since the stdlib is reasonable. If I decide to use C instead, I'm screwed.

Also, a number of people are saying "O(n) lookup for lists", which seems a bit silly

It's true.

even if it's kind of true

Yes, good point. But it's not kind of true; it's true. Period.

because we all know that you can build trees with cons cells

[I'm assuming the argument is that lookup in trees is O(lg n), which is less than O(n)]

Yes, but (search) trees have fundamentally different properties than lists. What if the order is important? It's lost in a tree. What if iteration is important? It's a bit more complicated. What if we care about insertion? If you do it naively it'll morph into a linked list (and it's O(lg n) anyway); if you do it well it's even more expensive. What if we care about deletion? It's a giant cluster**** with trees.

I think the question was more about, "are s-expressions enough?"

S-expressions are syntax, nothing more. I can define a map with O(1) lookup time with an s-expression. In my code it looks like this:

(let ((my-awesome-map (make-hash-table))) ...)

And I can do operations on it such:

(gethash 'foo my-awesome-map)

You might say that's cheating, but I can assure you the implementation uses s-expressions as well. Maybe you meant that there's no out-of-the-box support for, for example, hash table literals--we need to do a song and dance with setf and gethash. If it's affecting your daily life, make or download a reader macro.

Personally, I'm really attracted to the "scripting" way of thinking

And what way is that? Is it the way of, "This implementation works, and I'm only running this a few times, and I don't really care about performance"? That's not viable for serious software. Or the way of, "Let's add syntax to make common operations more concise"? Unless you hate parentheses, any verbosity in CL is completely your fault. Or the way of, "Using an interpreter and dynamic, implicit types makes my life easier"? CL has you covered.

Don't get me wrong--I love me some Python and Ruby, both of which are frequently considered scripting languages. And I'm not wild about Java, which is certainly not a scripting language. I just don't see how all this connects to Lisp or data structures.

Why not just use lists for everything? by keveamin lisp

[–]Tiomaidh 1 point2 points ago

The linear search cost depends on bucket size, which is independent of n. If I store no more than ten things in each bucket, then it will be as fast to find something in a hash table of size 100 as it will in a hash table of size 1,000,000.

The sticky point is when the table reaches capacity and everything needs to be rehashed, which wallops you with an expensive, O(n) operation. But in the real world, you probably have a decent idea of how much data is going to be stored, and can plan accordingly.

Verizon Will End Unlimited Data Grandfathering If You Buy A 4G Phone From This Summer Onward - Time to switch carriers by aesamattkiin Android

[–]Tiomaidh 0 points1 point ago

How do you get 5GB/month with Google Music? Cache all your music, and only download new stuff when you have a wifi connection (so, at home, overnight?).

What gadget/thing do you use for something it was not intended to be used for? by FunGal_in_SoCalin AskReddit

[–]Tiomaidh 13 points14 points ago

Have you talked to Amazon? They're usually really excellent about replacing broken Kindles, even if it was completely your fault.

What strange/eerie things have happened to you? by razor-edgein AskReddit

[–]Tiomaidh 84 points85 points ago

I'm pronouncing it fyookjay, which reminds me of Tobias Fünke, which is a win in my book.

Parents of Reddit, do your children's names have a fun/quirky story behind them? by falling_stonein AskReddit

[–]Tiomaidh 1 point2 points ago

I know a Latina girl named Ayleen (first syllable rhymes with the month May). She doesn't speak Spanish. I have a hypothesis that her parents do speak Spanish, heard the name Eileen, used Spanishesque spelling for the first half out of ignorance, moved to the US, and then discovered that in English what they'd written was in fact not Eileen.

Richard Stallman has just canceled a talk in the UPC university in Spain and they call an ambulance by Kuratagiin linux

[–]Tiomaidh 14 points15 points ago

I read his "rider" a few months ago, and disagree that he came off as a prick. He's a busy man, he knows what he wants, and it's to whoever's housing him's benefit to know what does and does not make him happy. None of his demands were completely unreasonable or rude, he just realized that nobody will know how to make him as happy as reasonably possible unless he tells them.

Summer Glau Ballerina (xpost /r/gentlemanboners) by jackoneil95in firefly

[–]Tiomaidh 11 points12 points ago

She always did love to dance...

If you don't do this, I highly recommend it by smittybenin CampingandHiking

[–]Tiomaidh 4 points5 points ago

If you do do this, then the conditional is vacuously true regardless of his recommendation.

I'm very new to Lisp and functional programming, so excuse the idiotic question by eafkuorin lisp

[–]Tiomaidh 1 point2 points ago

You can package things up as an executable for end-users. It's just that from the programmers perspective it's the most convenient to push stuff into the REPL from SLIME.

Arch + Openbox + Tint2 by Ca5bahin openbox

[–]Tiomaidh 2 points3 points ago

.tint2rc?

Is a true artificial intelligence only science fiction or will we be able to create one? by Flelchdorkin askscience

[–]Tiomaidh 29 points30 points ago

In Thinking, Fast and Slow, Daniel Kahneman describes the brain as being composed of two systems. System 1 is fast, intuitive, and does things we consider easy. System 2 is slow, computational, and does things we consider cognitively hard. Absent-mindedly reading and understanding this sentence? System 1. Trying to calculate 17 * 24? System 2. More to the point: visually identifying the chess piece you want to pick up? System 1. Figuring out what the best chess move is? System 2.

What's interesting is that almost everything that System 1 does--which is trivial for all non-brain-damaged humans--is really, really hard for computers. And almost everything System 2 does--which ranges from annoying to almost-impossible for us--has established, effective ways for computers to do it.

So one might think that we just need to focus research on System 1 and figure out what algorithms it uses under the hood, and that then we computer scientists will be able to code something to emulate it. But, of course, this is very difficult. And one factor is that System 1 messes up pretty frequently--there's way too many mediocre heuristics that just fail. One example from the book is this:

Steve is very shy and withdrawn, invariably helpful but with little interest in people or in the world of reality. A meek and tidy soul, he has a need for order and structure and a passion for detail.

Is Steve more likely to be a librarian or a farmer?

System 1 has an easy answer--librarian. System 2, if applied, may have the correct answer--a farmer (since there are so many more farmers than librarians in the world, it's much more likely for Steve to be a farmer, regardless of his personality). So, if I had my Magical General-Purpose Intelligence Machine and I asked it this question, what should it answer? Should it succumb to the same cognitive biases that the human brain does? Or should it go for the more correct but less human answer?

And this example was chosen for the book since it reflects human cognitive biases well. But there's a lot of problems that are more practical but have the same general pattern, where there's an intuitive answer and a different logical answer.

Source: Everything about human psychology is from the book. Everything about computers is from me, an undergraduate Computer Science student especially interested in AI.

Federal Sales Tax? by djfutilein AskReddit

[–]Tiomaidh 1 point2 points ago

Nope because rich people can import things from overseas

...customs/import tax?

Sneak it from Mexico

...which is illegal. All it takes is a few high-profile busts and it won't be a huge problem.

view more: next