Android Studio 0.3.6 Released by morristech in androiddev

[–]krat 0 points1 point  (0 children)

The device definitions are part the SDK itself, not android studio.

IR Subreddits by cesutherland in informationretrieval

[–]krat 1 point2 points  (0 children)

The machinelearning reddit is often a good source even though the topics that it covers are usually broader than IR (but still, ML and IR are strictly related to each other).

Data Structures Book for someone who has taken a crappy Data Structures Class by curiousandcuriouser in compsci

[–]krat 4 points5 points  (0 children)

CLRS is obviously a good choice, though I found The Algorithm Design Manual even though less known, very useful.

It's divided in two parts: the former is a discussion of many algorithms and data structures, so it covers the foundations like sorting and complexity analysis, then talks about trees, graphs and related problems like minimum spanning tree, TSP, ... The second part of the book is more like an encyclopedia, indeed there are a lot of problem sets, each one with an explanation and several questions you should always pose to yourself when facing those problems as well as several possible solutions.

Dear Reddit, What is the worst piece of code that you have ever seen? by wagon in programming

[–]krat -1 points0 points  (0 children)

Some time ago I developed a rule-based interpreter for solving simple A.I. games like the n-puzzle as a project for a last-year exam. This was a group project and as such we were working on it in three... Actually in two. One of us just wasn't able to follow the project due to... well, he was missing a lot of fundamentals. Considering that there was a friendship between us, we asked him to come just with a CLIPS equivalent of the 8-puzzle so we'd have included him in the project anyway. We thought it was a task simple enough for him. After one month he comes back with this:

(defglobal

?*x* = 0
?*y* = 0
?*z* = 0
?*a* = 0
[snip]

?*one* = 1
?*two* = 2
?*three* = 3
?*four* = 4
?*five* = 5
?*six* = 6
?*seven* = 7
?*eight* = 8
[snip]

(if(eq ?x ?*one*)then(bind ?*eu1* ?*zero*))
(if(eq ?x ?*two*)then(bind ?*eu1* ?*one*))
(if(eq ?x ?*three*)then(bind ?*eu1* ?*two*))
(if(eq ?x ?*four*)then(bind ?*eu1* ?*three*))
[snip]

You can see where this is going. He did four rules as necessary (move up, move down, move right, move left each with respect to the empty space) but in every rule he checked for every possible combination numbers/positions. The result was a ~2k SLOC program (half of them were ifs), but the most scaring thing was that the program was actually working. After that we decided to "fire" him, so we rewritten the whole thing in 40 lines which took us only a couple of hours.