hellsten + programming   184

Decision Tables • Hillel Wayne
A decision table is a means of concisely representing branching and conditional computations. In the most basic form, you have some columns that represent the “inputs” as booleans and some columns that represent outputs and effects. It looks like this:
programming  software-engineering  cs 
29 days ago by hellsten
Yoda conditions - Wikipedia
Using Yoda conditions:

if (42 = myNumber) { /* ... */ }
// This is a syntax error and will not compile
programming  details  security 
may 2018 by hellsten
Taco Bell Programming
Here's a concrete example: suppose you have millions of web pages that you want to download and save to disk for later processing. How do you do it? The cool-kids answer is to write a distributed crawler in Clojure and run it on EC2, handing out jobs with a message queue like SQS or ZeroMQ.

The Taco Bell answer? xargs and wget. In the rare case that you saturate the network connection, add some split and rsync. A "distributed crawler" is really only like 10 lines of shell script.

Moving on, once you have these millions of pages (or even tens of millions), how do you process them? Surely, Hadoop MapReduce is necessary, after all, that's what Google uses to parse the web, right?

Pfft, fuck that noise:

find crawl_dir/ -type f -print0 | xargs -n1 -0 -P32 ./process
32 concurrent parallel parsing processes and zero bullshit to manage. Requirement satisfied.

Every time you write code or introduce third-party services, you are introducing the possibility of failure into your system. I have far more faith in xargs than I do in Hadoop. Hell, I trust xargs more than I trust myself to write a simple multithreaded processor. I trust syslog to handle asynchronous message recording far more than I trust a message queue service.
programming  productivity  unix  linux 
march 2018 by hellsten
A Million WebSockets and Go – freeCodeCamp
Let’s structure the optimizations I told you about.
A read goroutine with a buffer inside is expensive. Solution: netpoll (epoll, kqueue); reuse the buffers.
A write goroutine with a buffer inside is expensive. Solution: start the goroutine when necessary; reuse the buffers.
With a storm of connections, netpoll won’t work. Solution: reuse the goroutines with the limit on their number.
net/http is not the fastest way to handle Upgrade to WebSocket. Solution: use the zero-copy upgrade on bare TCP connection.
That is what the server code could look like:
architecture  programming  hn  mail.ru  server  golang 
august 2017 by hellsten
P10.pdf
10. Rule: All code must be compiled, from the first day of development, with all
compiler warnings enabled at the compiler’s most pedantic setting. All code must
compile with these setting without any warnings. All code must be checked daily with
at least one, but preferably more than one, state-of-the-art static source code analyzer
and should pass the analyses with zero warnings.
safety  coding  programming 
march 2017 by hellsten
math-as-code/README.md at master · Jam3/math-as-code
This is a reference to ease developers into mathematical notation by showing comparisons with JavaScript code.

Motivation: Academic papers can be intimidating for self-taught game and graphics programmers. :)


s - italic lowercase letters for scalars (e.g. a number)
x - bold lowercase letters for vectors (e.g. a 2D point)
A - bold uppercase letters for matrices (e.g. a 3D transformation)
θ - italic lowercase Greek letters for constants and special variables (e.g. polar angle θ, theta)
math  mathematics  cheatsheet  best  programming  cs  faq  academic  papers  notation 
november 2016 by hellsten
The One Method I’ve Used to Eliminate Bad Tech Hires - Mattermark
Let’s be real. Interviews are a terrible way to hire tech candidates. Not only do you not get a real sense of the candidate, they often weed out good candidates in favor of bad ones.

In this fantastic article on Medium by Eric Elliott, he talks about many of the techniques that work and don’t work for interviewing engineers.

In regards to what works the best, I found that these 2 ideas work the best when combined.

PAID Sample project assignment (err on the side of paying fairly — say $100+/hour for estimated completion time — if the problem should require 2 hours to complete, offer $200)
Bring the candidate in and discuss the solution. Let the candidate talk about their design decisions, challenge them as you would any team member and let them provide their reasoning.


We have gone from “This candidate is exactly what we need” to “I have serious doubts about working with this candidate long term” and we’ve had candidates change our bad perception of them using this technique. It’s very easy for someone to embellish (to put it generously) their resume, and coding trivia can be memorized, but it’s really hard for someone to fake actual skill.
hiring  interview  management  business  programming 
november 2016 by hellsten
Why Probabilistic Programming Matters Last week, DARPA announced a new progr...
So, that's probabilistic programming in a nutshell. It's clearly cool, but why does it matter?

Probabilistic programming will unlock narrative explanations of data, one of the holy grails of business analytics and the unsung hero of scientific persuasion. People think in terms of stories - thus the unreasonable power of the anecdote to drive decision-making, well-founded or not. But existing analytics largely fails to provide this kind of story; instead, numbers seemingly appear out of thin air, with little of the causal context that humans prefer when weighing their options.
probabilistic-programming  probabilistic  programming  logic  logic-programming  ai  machine-learning 
november 2016 by hellsten
FrontPage - OpenBUGS
BUGS is a software package for performing Bayesian inference Using Gibbs Sampling. The user specifies a statistical model, of (almost) arbitrary complexity, by simply stating the relationships between related variables. The software includes an ‘expert system’, which determines an appropriate MCMC (Markov chain Monte Carlo) scheme (based on the Gibbs sampler) for analysing the specified model. The user then controls the execution of the scheme and is free to choose from a wide range of output types.
probabilistic-programming  probabilistic  programming  logic  logic-programming  ai  machine-learning 
november 2016 by hellsten
Declaring Reality: An Introduction to Datalog | Hacker News
Any comparisons with:
- minikanren
- constraint logic prog
- constraint solving
- inductive logic
probabilistic-programming  probabilistic  programming  logic  logic-programming  ai  machine-learning 
november 2016 by hellsten
What is the difference between deep learning and usual machine learning? | Hacker News
If you're looking for symbolic approaches within machine learning, Luc De Raedt's textbook has the works:
http://www.springer.com/us/book/9783540200406
Lise Getoor from MIT is also doing a lot of work with statistical relational learning in particular, which is kind of a cross between GOFAI (the "relational" bit) and nouveau AI (the "statistical" part):
http://www.cs.umd.edu/srl-book/
In the UK I know of Kristian Kersting who does statistical relational learning research, at Dortmund:
http://www-ai.cs.uni-dortmund.de/PERSONAL/kersting.html
I think this is not exactly what you were asking for but I think you might find it interesting, particularly Inductive Logic Programming (of which there's oodles in De Raedt's book).
Personally, I started an MSc in AI because I was interested in all the symbolic stuff, and I was a bit disappointed to find there were almost none of that left in the curriculum (at my school anyway, the University of Sussex). I guess I kind of see the point though- knowledge engineering is pretty hard and costly and learning from data is very attractive. I really don't like the idea of doing it all with statistical black-boxes, though. So relational learning is a kind of halfway house for me, where I can still use mathematical logic principles and not have to eat%
probabilistic-programming  probabilistic  programming  logic  logic-programming  ai  machine-learning 
november 2016 by hellsten
Error Handling in Node.js | Hacker News
1 - Don't catch errors unless you can actually handle them (and chances are, you can't handle them). Let them bubble up to a global handler, where you can have centralized logging. There's a fairly old discussion with Anders Hejlsberg that talks about this in the context of Java's miserable checked exception that I recommend [1]. This is also why, in my mind, Go gets it wrong.
2 - In the context of error handling (and system quality), logging and monitoring are the most important thing you can do. Period. Only log actionable items, else you'll start to ignore your logs. Make sure your errors come accompanied by a date (this can be done in your central error handler, or at ingestion time (via logstash or what have you)
3 - Display generic/canned errors to users...errors can contain sensitive information.
4 - Turn errors you run into and fix into test cases.
[1] - http://www.artima.com/intv/handcuffs.html
logging  errors  details  programming 
november 2016 by hellsten
Bitcoin Tutorials
This introductory guide will teach you the basics of 21.

Installing 21
Using 21 as an app
Using the 21 marketplace
Setting up your 21 profile
Writing programs with the 21 library
bitcoin  api  programming  tutorial  bitcoins 
september 2016 by hellsten
A Gentle Guide to Constraint Logic Programming <i>via</i> ECLiPSe free textbook for learning CLP
The book is an introductory and down-to-earth presentation of Constraint Logic Programming (CLP), an exciting software paradigm, more and more popular for solving combinatorial as well as continuous constraint satisfaction problems and constraint optimization problems. It is based on the popular, intensively supported and documented ECLiPSe platform, freely available under Cisco-style Mozilla Public License.
The Author aims at teaching modeling i.e. translating verbal problem statements into Prolog or CLP programs. This has been dealt with by a series of problems of increasing complexity, translated into Prolog or CLP programs and running under ECLiPSe. The theoretical background has been minimized while stressing intuitive understanding. Presented constraint satisfaction problems deal with finding feasible/optimal states, and feasible/optimal state-space trajectories, starting with simple puzzles and proceeding to advanced ones, like graph coloring problems, schedu-ling problems with particular attention to job-shop problems (including the famous MT10 benchmark), and Traveling Salesman Problems. The last chapter is concerned with Continuous Constraints Satisfaction and Constraint Optimization Problems.
clp  constraint-logic  programming  optimization 
august 2016 by hellsten
CLP(FD) Constraint Logic Programming over Finite Domains
clp(fd) is a library included in the standard SWI-Prolog distribution. It solves problems that involve sets of variables, where relationships among the variables need satisfied.
Robert Wadlow
clp(fd) is also useful for replacing many of the guard functions provided by getters and setters in OO languages. For example, if we don’t know a person’s actual height yet, we can still assert that it’s more than 21 and less than 108 inches (shortest/tallest people known). When we eventually do find a solution, unreasonable values will be rejected.
clp(fd) is useful for optimizing search problems by reducing search spaces. Constraints can trim away entire subtrees of the search space.
clp(fd) is useful for solving a wide variety of find values for these variables problems. Here are some broad categories of problems that clp(fd) can address:
Scheduling problems, like, when should we do what work in this factory to make these products?
Optimization problems, like which mix of products should we make in this factory to maximize profits?
Satisficing problems, like finding an arrangement of rooms in a hospital that meets criteria like having the operating theater near the recovery rooms, or finding a set of vacation plans the whole family can agree on.
Sequence problems, like finding a travel itinerary that gets us to our destination.
Labeling problems, like Sudoku or Cryptarithm puzzles
Problems of belief and intention, like detective puzzles and NPC’s in games
Allocation problems, like finding an assignment of flight crews to aircraft that meets union requirements for maximum time away from home
finding acceptable solutions to linked sets of variables, for example, working out who’se going to the party among a group of jealous teenage girls when A will only go if B goes, but B won’t go if C goes, and so on
Creating lists of acceptable alternatives for multiple interacting variables. For example, a caterer might want to see different offerings for a banquet menu that meet some criteria of cost, scheduling of cooks and waiters, ovens, and so on, then decide for themeselves which to select.
Geometric constraints for graphics, eg. a CAD system, where two lines must be perpendicular, another two parallel, others 30 inches apart, and so on.
clp  prolog  constraint  logic  programming  optimization  decision-tree  sequence  labeling  allocation  transport 
august 2016 by hellsten
logic programming - Real world Prolog usage - Stack Overflow
Yes, Prolog is underrated and underrepresented, especially in the industry. People still think it's esoteric and whatnot, and it doesn't have the great community Haskell has. Plus, it suffers from the same Lisp disease of having too many different competing implementations. Although SWI and Sicstus are pretty much the "industry" standards right now.
prolog  logic  programming 
august 2016 by hellsten
Dataflow programming - Wikipedia, the free encyclopedia
In computer programming, dataflow programming is a programming paradigm that models a program as a directed graph of the data flowing between operations, thus implementing dataflow principles and architecture. Dataflow programming languages share some features of functional languages, and were generally developed in order to bring some functional concepts to a language more suitable for numeric processing. Some authors use the term Datastream instead of Dataflow to avoid confusion with Dataflow Computing or Dataflow architecture, based on an indeterministic machine paradigm. Dataflow programming was pioneered by Jack Dennis and his graduate students at MIT in the 1960s.
workflow  dataflow  programming  cs  architecture 
august 2016 by hellsten
How to Pass a Programming Interview | Hacker News
For a while, we had a non-typical interview strategy: A take-home project. We would give the candidate a week or so to work on a smallish project, the requirements of which we would specify. After they completed the project, we would do a group walkthrough with them.
We've hired five engineers over the last three years. For the first two, we did the take-home project. But, then I started to wonder a bit about if it was reasonable to ask programmers to work a weekend on a project. The...
hiring  interview  programming  career  best 
march 2016 by hellsten
How to do distributed locking — Martin Kleppmann’s blog
If you need locks only on a best-effort basis (as an efficiency optimization, not for correctness), I would recommend sticking with the straightforward single-node locking algorithm for Redis (conditional set-if-not-exists to obtain a lock, atomic delete-if-value-matches to release a lock), and documenting very clearly in your code that the locks are only approximate and may occasionally fail. Don’t bother with setting up a cluster of five Redis nodes.

On the other hand, if you need locks for correctness, please don’t use Redlock. Instead, please use a proper consensus system such as ZooKeeper, probably via one of the Curator recipes that implements a lock. (At the very least, use a database with reasonable transactional guarantees.) And please enforce use of fencing tokens on all resource accesses under the lock.


Note this requires the storage server to take an active role in checking tokens, and rejecting any writes on which the token has gone backwards. But this is not particularly hard, once you know the trick. And provided that the lock service generates strictly monotonically increasing tokens, this makes the lock safe. For example, if you are using ZooKeeper as lock service, you can use the zxid or the znode version number as fencing token, and you’re in good shape [3].

However, this leads us to the first big problem with Redlock: it does not have any facility for generating fencing tokens. The algorithm does not produce any number that is guaranteed to increase every time a client acquires a lock. This means that even if the algorithm were otherwise perfect, it would not be safe to use, because you cannot prevent the race condition between clients in the case where one client is paused or its packets are delayed.
zookeeper  transaction  reliability  programming  best  redis  redlock  locking  algorithm 
february 2016 by hellsten
The most important skill in software development | Hacker News
> Sadly there's (seemingly) no way to interview people for this ability
I had one interview where the interviewer simply showed me a printed page of code, and asked me to talk about it.
I spotted a few problems and debatable constructs, and we had a good 3 minutes discussion.
Since at least I spend more time reading code than writing it, that felt like a truer test of my abilities than many of the coding tasks.
interview  interviewing  programming 
june 2015 by hellsten
The most important skill in software development | John D. Cook
Here’s an insightful paragraph from James Hague’s blog post Organization skills beat algorithmic wizardry:

When it comes to writing code, the number one most important skill is how to keep a tangle of features from collapsing under the weight of its own complexity. I’ve worked on large telecommunications systems, console games, blogging software, a bunch of personal tools, and very rarely is there some tricky data structure or algorithm that casts a looming shadow over everything else. But there’s always lots of state to keep track of, rearranging of values, handling special cases, and carefully working out how all the pieces of a system interact. To a great extent the act of coding is one of organization. Refactoring. Simplifying. Figuring out how to remove extraneous manipulations here and there.

Algorithmic wizardry is easier to teach and easier to blog about than organizational skill, so we teach and blog about it instead. A one-hour class, or a blog post, can showcase a clever algorithm. But how do you present a clever bit of organization? If you jump to the solution, it’s unimpressive. “Here’s something simple I came up with. It may not look like much, but trust me, it was really hard to realize this was all I needed to do.” Or worse, “Here’s a moderately complicated pile of code, but you should have seen how much more complicated it was before. At least now someone stands a shot of understanding it.” Ho hum. I guess you had to be there.
software-development  engineering  algorithms  advice  best  programming 
june 2015 by hellsten
Follow-up to "Functional Programming Doesn't Work"
My real position is this: 100% pure functional programing doesn't work. Even 98% pure functional programming doesn't work. But if the slider between functional purity and 1980s BASIC-style imperative messiness is kicked down a few notches--say to 85%--then it really does work. You get all the advantages of functional programming, but without the extreme mental effort and unmaintainability that increases as you get closer and closer to perfectly pure.

That 100% purity doesn't work should only be news to a couple of isolated idealists. Of the millions of non-trivial programs ever written--every application, every game, every embedded system--there are, what, maybe six that are written in a purely functional style? Don't push me or I'll disallow compilers for functional languages from that list, and then it's all hopeless.

"Functional Programming Doesn't Work" was intended to be optimistic. It does work, but you have to ease up on hardliner positions in order to get the benefits.
functional-programming  programming  scheme 
may 2015 by hellsten
Functional Programming Doesn't Work (and what to do about it)
After spending a long time in the functional programming world, and using Erlang as my go-to language for tricky problems, I've finally concluded that purely functional programming isn't worth it. It's not a failure because of soft issues such as marketing, but because the further you go down the purely functional road the more mental overhead is involved in writing complex programs. That sounds like a description of programming in general--problems get much more difficult to solve as they increase in scope--but it's much lower-level and specific than that. The kicker is that what's often a tremendous puzzle in Erlang (or Haskell) turns into straightforward code in Python or Perl or even C.

Imagine you've implemented a large program in a purely functional way. All the data is properly threaded in and out of functions, and there are no truly destructive updates to speak of. Now pick the two lowest-level and most isolated functions in the entire codebase. They're used all over the place, but are never called from the same modules. Now make these dependent on each other: function A behaves differently depending on the number of times function B has been called and vice-versa.
functional-programming  scheme  programming 
may 2015 by hellsten
Salt & Pepper, please: a note on password storage
Everyone will tell you that the best practice for password storage is [sb]crypt with random salt. Ok, we got that and even maybe got everyone to agree. But let me bump that up a notch: do you know what pepper is?

The concept of peppering is simple: add a extra, fixed, hardcoded salt. (On top of what you are already doing, obviously.)

That is, do something like:

salt = urandom(16)
pepper = "oFMLjbFr2Bb3XR)aKKst@kBF}tHD9q" # or, getenv('PEPPER')
hashed_password = scrypt(password, salt + pepper)
store(hashed_password, salt)
Does this seem useless? Well if you think about it, most password leaks happen because of database leaks (SQL injection, DB credential compromise, DB auth bypass...) and attackers might not necessarily get access to the webserver. In that case, the hashes would be completely useless.

Yes, this is not sureproof, attackers might also get access to your webserver, but security is all about layers and raising cost, no? Who knows, maybe the eBay leaked hashes would have been useless to the attackers were they peppered.
salting  password  security  programming  pepper 
march 2015 by hellsten
Conclusion on Nim · HookRace - a Nim blog for now
why I personally have decided for Nim in favor of Rust, C++, Python and Haskell:

Nim is not the fastest language, it's not the easiest language to write in and it surely has some flaws that should be fixed. Nim has no single "killer feature" like go's goroutines or Rust's memory management. But Nim doesn't need a killer feature. Instead it strikes a reasonable balance that makes it the most efficient language for me:

I can produce reasonably efficient code (faster than Python and Haskell)
that is reasonably readable (more so than Rust, C++ and Haskell)
in a reasonable amount of time (less than Rust, C++ and Haskell)
nim  python  programming  tolearn 
march 2015 by hellsten
stuartsierra/component
(:require [com.stuartsierra.component :as component]
clojure  component  programming 
january 2015 by hellsten
Understanding Computation
These are foundational concepts that you’ll wish you’d always known, digested and presented in a way that makes sense; universal truths which are interesting in their own right, but which also give you a better understanding of the way you do your job and the limitations of what’s possible.

Over the course of the book, you will:

implement two different interpreters, and a compiler, for a toy programming language;
build simulations of deterministic and nondeterministic finite automata, pushdown automata and Turing machines;
build a simple implementation of regular expressions from scratch;
construct a lexical analyzer and LL parser for a toy programming language;
write Ruby programs in the style of the lambda calculus;
implement the lambda calculus directly in Ruby;
implement other universal systems (partial recursive functions, the SKI combinator calculus, Iota, tag systems and cyclic tag systems) in Ruby;
extend a program to make it compute its own source code;
investigate programs that can’t be written in Ruby; and
build a simple type system.
To find out more, please check out the table of contents, download a sample chapter, read what people are saying on Twitter, watch some related videos, download the example code, and get in touch with any questions or comments.
cs  programming  toread  ruby 
january 2015 by hellsten
Refactoring Ruby with Monads
The big benefit of monads is that they give us a common interface which allows us to do one thing: connect together a sequence of operations. The #and_then method means “do the next thing”, but the way it “does the next thing” depends on which monad you use:

Optional#and_then does the next thing only if the value isn’t nil;
Many#and_then does the next thing many times, once for each value; and
Eventually#and_then does the next thing once the value becomes available.
As you might imagine, there are plenty of other monads with different “do the next thing” behaviours.
monads  monad  ruby  best  programming 
january 2015 by hellsten
papers-we-love/out-of-the-tar-pit.pdf at master · papers-we-love/papers-we-love
The primary status of complexity as the
major cause of these other problems comes simply from the fact that being
able to understand a system is a prerequisite for avoiding all of them, and
of course it is this which complexity destroys.

“...we have to keep it crisp, disentangled, and simple if we refuse
to be crushed by the complexities of our own making...”

Being able to think and reason about our systems (particularly the effects
of changes to those systems) is of crucial importance.

“I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies. The first method is far
more difficult.”

Dijkstra observed [Dij71, EWD303]:
“testing is hopelessly inadequate....(it) can be used very effectively
to show the presence of bugs but never to show their absence.”
We agree with Dijkstra. Rely on testing at your peril.

Avoid complexities caused by state, control, and code volume.
software  programming  architecture  testing  simplicity  best  paper 
december 2014 by hellsten
fogus: 10 Technical Papers Every Programmer Should Read (At Least Twice)
When I first started writing, one of the pieces of advice that I heard was that you should always imagine that you are writing to a particular person.

The gist is that the primary sources of complexity in our programs are caused by mutable state. With that as the premise, the authors build the idea of “functional relational programming” that espouses minimizing mutable state, moving whatever remains into relations, and then manipulating said relations using a declarative programming language. Simple right? Well, yes it is simple; and that’s what makes it so difficult.
programming  cs  functional-programming  immutable  mutable  best 
december 2014 by hellsten
RubyFunctionalProgramming - tokland - Functional programming with Ruby - My personal repository for code and documentation - Google Project Hosting
Joe Armstrong (the creator of Erlang) discussed in "Coders At work" about the reusability of Object-Oriented Programming:

"I think the lack of reusability comes in object-oriented languages, not in functional languages. Because the problem with object-oriented languages is they've got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle."

To be fair, in my opinion it's not an intrinsic problems of OOP. You can write OOP code which is also functional, but certainly:

Typical OOP tends to emphasize change of state in objects.
Typical OOP tends to impose tight coupling between layers (which hinders modularization).
Typical OOP mixes the concepts of identity and state.
Mixture of data and code raises both conceptual and practical problems.
functional-programming  programming  ruby 
december 2014 by hellsten
Rust Means Never Having to Close a Socket
Because Rust is a different kind of programming language, it might be difficult to understand what I mean, so let me be perfectly clear:

In Rust, as in garbage collected languages, you never explicitly free memory
In Rust, unlike in garbage collected languages, you never1 explicitly close or release resources like files, sockets and locks
Rust achieves both of these features without runtime costs (garbage collection or reference counting), and without sacrificing safety.
If you've ever leaked a socket or a file, or used an abstraction that leaked these resources, you know how big of a deal this is.
rust  programming 
december 2014 by hellsten
The Pragmatic Bookshelf | Tell, Don't Ask
according to the Law of Demeter for Methods, any method of an object should only call methods belonging to:

itself.
any parameters that were passed in to the method.
any objects it created.
any composite objects.
Specifically missing from this list is methods belonging to objects that were returned from some other call.
law-of-demeter  programming  details  oop 
december 2014 by hellsten
oop - How do I design a class in Python? - Stack Overflow
The following advices (similar to @S.Lott's advice) are from the book, Beginning Python: From Novice to Professional

Write down a description of your problem (what should the problem do?). Underline all the nouns, verbs, and adjectives.

Go through the nouns, looking for potential classes.

Go through the verbs, looking for potential methods.

Go through the adjectives, looking for potential attributes

Allocate methods and attributes to your classes

To refine the class, the book also advises we can do the following:

Write down (or dream up) a set of use cases --- scenarios of how your program may be used. Try to cover all the functionally.

Think through every use case step by step, making sure that everything we need is covered.
programming  design  architecture  oop 
december 2014 by hellsten
The Case for Slow Programming – JJ Ventrella Thing
The Slow Programming Movement

The casualty of my being a slow programmer among fast programmers was a form of dysrhythmia – whereby my coding rhythm got aliased out of existence by the pummeling of other coders’ machine gun iterations. My programming style is defined by organic arcs of different sizes and timescales, Each arc starts with exploration, trial and error, hacks, and temporary variables. Basically, a good deal of scaffolding. A picture begins to take shape. Later on, I come back and dot my i’s and cross my t’s. The end of each arc is something like implementation-ready code. (“Cleaning my studio” is a necessary part of finishing the cycle). The development arc of my code contribution is synonymous with the emergence of a strategy, a design scheme, an architecture.

Any coder who claims that fast programming is the same as slow programming (except that it’s fast), doesn’t understand Design Process. For the same reason that many neuroscientists now believe that the fluid-like flow of neuronal firing throughout the brain has a temporal reverberation which has everything to do with thought and consciousness, good design takes time.

According to Wikipedia: “The slow programming movement is part of the slow movement. It is a software development philosophy that emphasises careful design, quality code, software testing and thinking. It strives to avoid kludges, buggy code, and overly quick release cycles.

Wikipedia also says this about “Slow Software Development”: “As part of the agile software development movement, groups of software developers around the world look for more predictive projects, and aiming at a more sustainable career and work-life balance. They propose some practices such as pair programming, code reviews, and code refactorings that result in more reliable and robust software applications.”
slow  best  details  slow-programming  programming 
december 2014 by hellsten
Google Code Jam
Google Code Jam is back in action challenging professional and student programmers around the globe to solve difficult algorithmic puzzles. This year's Code Jam consists of four online rounds and concludes with the Onsite World Finals under the California sun in Google's Los Angeles office. The competition will really heat up this August during the finals, where the top 25, along with last year's champion, Ivan Miatselski (mystic) of Belarus, will jam it out for the $15,000 grand prize, the coveted title of Code Jam 2014 Champion and automatic qualification in the Code Jam 2015 finals to defend the title.
algorithms  contest  challenge  programming  todo 
april 2014 by hellsten
Become a better programmer with programming challenges | Hacker News
I agree with several already-existing comments that programming challenges do not help you become a better programmer (assuming that you're hireable in the first place).
I will note, however, that they DO HELP with interviewing. The skillset is quite overlapping... artificial time-pressure, artificially contrived problems, cleverness is rewarded, etc. (But it's not entirely the same, because programming contests don't give points for half-working answers).
Also, IMO the best coding contest site is http://code.google.com/codejam/, because:
1) GCJ has unusually clear problem statements. UVa in particular is terrible for this.
2) GCJ supports EVERY programming language (unlike all others I know of except Project Euler)
programming  contest  challenge 
april 2014 by hellsten
The Twelve-Factor App
Introduction
In the modern era, software is commonly delivered as a service: called web apps, or software-as-a-service. The twelve-factor app is a methodology for building software-as-a-service apps that:

Use declarative formats for setup automation, to minimize time and cost for new developers joining the project;
Have a clean contract with the underlying operating system, offering maximum portability between execution environments;
Are suitable for deployment on modern cloud platforms, obviating the need for servers and systems administration;
Minimize divergence between development and production, enabling continuous deployment for maximum agility;
And can scale up without significant changes to tooling, architecture, or development practices.
software-architecture  development  architecture  programming  saas 
march 2014 by hellsten
The guide to implementing 2D platformers | Higher-Order Fun
The guide to implementing 2D platformers
Having previously been disappointed by the information available on the topic, this is my attempt at categorizing different ways to implement 2D platform games, list their strengths and weaknesses, and discuss some implementation details.
The long-term goal is to make this an exhaustive and comprehensible guide to the implementation of 2D platform games. If you have any sort of feedback, correction, request, or addition – please leave it in the comments!
2d  game-development  best  programming 
february 2014 by hellsten
33 Questions | Hacker News
Fun to think about, but in the real world, no question neatly divides people, even the gender one. To quote Reddit's u/tailcalled[1], the exo-software/meatspace world is even less standardized than the software world:
Falsehoods programmers believe about gender: http://www.cscyphers.com/blog/2012/06/28/falsehoods-programm...
Falsehoods programmers believe about names: http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...
Falsehoods programmers believe about addresses: http://www.mjt.me.uk/posts/falsehoods-programmers-believe-ab...
Falsehoods programmers believe about time: http://infiniteundo.com/post/25326999628/falsehoods-programm...
More falsehoods programmers believe about time: http://infiniteundo.com/post/25509354022/more-falsehoods-pro...
Falsehoods programmers believe about geography: http://wiesmann.codiferes.net/wordpress/?p=15187&lang=en
[1] http://www.reddit.com/r/programming/comments/1fc147/falsehoo...
reply
programming  gotchas 
november 2013 by hellsten
I'm learning to code by building 180 websites in 180 days. Today is day 115 | Hacker News
The ceramics teacher announced on opening day that he was dividing the class into two groups.
All those on the left side of the studio, he said, would be graded solely on the quantity of work they produced, all those on the right solely on its quality.
His procedure was simple: on the final day of class he would bring in his bathroom scales and weigh the work of the “quantity” group: 50 pounds of pots rated an “A”, 40 pounds a “B”, and so on.
Those being graded on “quality”, however, needed to produce only one pot — albeit a perfect one — to get an “A”.
Well, came grading time and a curious fact emerged: the works of highest quality were all produced by the group being graded for quantity.
It seems that while the “quantity” group was busily churning out piles of work-and learning from their mistakes — the “quality” group had sat theorizing about perfection, and in the end had little more to show for their efforts than grandiose theories and a pile of dead clay.
art  programming  productivity  inspiration  learning 
july 2013 by hellsten
Ask HN: What's the best technical talk you've heard? | Hacker News
Simple Made Easy changed how I think about constructing software systems of any kind. It provided me with a strong vocabulary and mental model to identify coupling and design with a more clear separation of concerns and focus on the output rather than the ease of development.
http://www.infoq.com/presentations/Simple-Made-Easy
reply


jacobolus 11 hours ago | link

Also see Stuart Halloway’s earlier talk, Simplicity Ain’t Easy. There’s a fair amount of overlap with Rich Hickey’s talk, but both are worth watching: http://www.youtube.com/watch?v=cidchWg74Y4
And also his talk Radical Simplicity: http://skillsmatter.com/podcast/java-jee/radical-simplicity/...
presentations  simplicity  software-design  programming  software-architecture 
april 2013 by hellsten
programming practices - Torvalds' quote about good programmer - Programmers
"Bad programmers worry about the code. Good programmers worry about data structures and their relationships."
linus-torvalds  programming  cs 
september 2012 by hellsten
"The Best Programming Advice I Ever Got" with Rob Pike | | InformIT
Ken taught me that thinking before debugging is extremely important. If you dive into the bug, you tend to fix the local issue in the code, but if you think about the bug first, how the bug came to be, you often find and correct a higher-level problem in the code that will improve the design and prevent further bugs.

I recognize this is largely a matter of style. Some people insist on line-by-line tool-driven debugging for everything. But I now believe that thinking—without looking at the code—is the best debugging tool of all, because it leads to better software.
programming  best  tips 
august 2012 by hellsten
Write Less Code
So why should you write less code? When I said earlier that your job was to write less code, I was fibbing a little bit. Really your job is to think, your job is to think about the problem at hand, devise an elegant solution and then turn that solution into software. One of the byproducts of creating software is that you have to write code to solve problems.
productivity  programming  think 
june 2012 by hellsten
The care and feeding of software engineers (or, why engineers are grumpy) | NCZOnline
you’re worth more than your code. Whatever your next gig is, make sure that you’re not a short-order cook.
Don’t accept a job where you’re told exactly what to build and how to build it.
You need to work somewhere that appreciates your insights into the product as well
as your ability to build it.

I can’t tell you how many startups contact me offering equity in exchange for building the founder’s vision.
The implication: we already have all of this figured out, we just need someone to build it.

The engineers want to be part of that creative process and are denied. Thus you end up with the typical software engineer personality accented by grumpiness.

The enemy of any creator is context switching
startup  business  engineers  software  programming  product-manager 
june 2012 by hellsten
What Makes Great Programmers Different? | Hacker News
You're spot on about different needs. I used to work for a guy who was a genius at managing programmers and providing an environment for them to thrive (at least he did that for me). He once told me that for an innovative multi-year software project, he needed a small team of really good programmers to spend several years building and refining the core system (on R&D dollars). Then, several years down the road when the contract dollars started coming in, he'd need a much bigger group of average programmers to handle all the humdrum tasks of moving the right bits to the right places, supporting the right formats and protocols, etc. He understood that the average programmers wouldn't be capable of the former, and the great programmers wouldn't enjoy the latter. It was a significant realization for me.
programming  hacking  development  career  jobs 
june 2012 by hellsten
What Makes Great Programmers Different? | Dr Dobb's
The good:
when faced with a difficult problem, they will lapse into quick and dirty hacking. They block themselves from greatness by not having the curiosity or know-how at their command to be more than they are. That is, they refine their skills principally by continued application, not by learning new technologies

The great:
the traits that most stand out are three in number: an excellent memory, a conspicuously wide knowledge of programming techniques and the judgment to know when to apply which, and a deep ability to relate details to the larger picture. The last trait — being capable of quickly shifting registers from the large picture to small details and back again — relies on the strong memory and operates on an almost automatic basis
programming  programmers  culture  comparison 
june 2012 by hellsten
Complication is What Happens When You Try to Solve a Problem You Don't Understand | SIGPWNED
A good developer has a natural, almost visceral aversion to complexity. A good developer smells complexity a mile away, and constantly shifts the code to keep his eyes to the front and his back upwind just so complexity can’t sneak up on him. It’s only by diligently trying to avoid all complexity that one can in fact avoid unnecessary complexity.
programming  complexity  simplicity 
may 2012 by hellsten
Coding Horror: How to Hire a Programmer
I'm far from an expert on in person interviews, but I don't like interview puzzle questions, to put it mildly.

Instead, I have my own theory about how we should interview programmers: have the candidate give a 15 minute presentation on their area of expertise. I think this is a far better indicator of success than a traditional interview, because you'll quickly ascertain …

Is this person passionate about what they are doing?
Can they communicate effectively to a small group?
Do they have a good handle on their area of expertise?
Would your team enjoy working with this person?
hiring  interview  programming  developer  best  hire 
march 2012 by hellsten
Simple Made Easy
a smaller and nicer version:

www.mediafire.com/?anvd1bb5218ja2r


Rich Hickey emphasizes simplicity’s virtues over easiness’, showing that while many choose easiness they may end up with complexity, and the better way is to choose easiness along the simplicity path.
video  presentation  development  simplicity  minimalism  software-design  software-architecture  programming 
december 2011 by hellsten
Advice From An Old Programmer
What I discovered after this journey of learning is that the languages did not matter, it's what you do with them. Actually, I always knew that, but I'd get distracted by the languages and forget it periodically. Now I never forget it, and neither should you.Which programming language you learn and use does not matter. Do not get sucked into the religion surrounding programing languages as that will only blind you to their true purpose of being your tool for doing interesting things.People who can code in the world of technology companies are a dime a dozen and get no respect. People who can code in biology, medicine, government, sociology, physics, history, and mathematics are respected and can do amazing things to advance those disciplines.
tosite1  development  programming  career 
june 2011 by hellsten
Clever Algorithms
The book "Clever Algorithms: Nature-Inspired Programming Recipes" by Jason Brownlee PhD describes 45 algorithms from the field of Artificial Intelligence. All algorithm descriptions are complete and consistent to ensure that they are accessible, usable and understandable by a wide audience.

5 Reasons To Read:

1. 45 algorithms described.
2. Designed specifically for Programmers, Research Scientists and Interested Amateurs.
3. Complete code examples in the Ruby programming language.
4. Standardized algorithm descriptions.
5. Algorithms drawn from the popular fields of Computational Intelligence, Metaheuristics, and Biologically Inspired Computation.
ai  algorithms  programming  book  ruby  free  tosite1 
february 2011 by hellsten
« earlier      
per page:    204080120160

related tags

2d  academic  activeresource  advice  aggregation  aggregator  agile  ai  algorith  algorithm  algorithms  allocation  analysis  analytics  anti-patterns  api  architecture  array  art  asynchronous  atom  average  backbone.js  banking  banks  bayesian  bdd  best  best-practices  bestpractices  big-o  bitcoin  bitcoins  blocks  book  books  boss  bullshit  business  c  c++  calculator  cardboard  career  challenge  cheatsheet  checklist  classification  clojure  clp  cocoa  cococa  code  codility  coding  coding-challenges  coding-convention  coffeescript  collaboration  communication  community  comparison  complexity  component  computer-science  constraint  constraint-logic  contest  conventions  cookbook  course  creativity  cs  cs193p  csv  culture  data-mining  database  dataflow  date  debug  debugging  decimal  decision-tree  design  details  developer  development  distributed  documentation  domain  e-commerce  ebook  education  email  encoding  engineering  engineers  english  entrepreneurship  errors  exceptions  faq  finance  flickr  float  formula  forum  framework  free  freelance  freelancing  function  functional-programming  funny  game-development  gdb  github  golang  gotcha  gotchas  grammar  gtd  hacking  hadoop  hash  hire  hiring  hn  hotness  idiom  imdb  immutable  inheritance  inspiration  interesting  interview  interviewing  io  ios  ipc  iphone  iphone-development  java  javascript  jobs  john-resig  jquery  jslint  json  karma  kata  kestrel  kids  kongregate  labeling  language  languages  latency  law-of-demeter  learning  lessons  lessons-learned  library  life  lifehacks  linguistics  linus  linus-torvalds  linux  locking  logging  logic  logic-programming  lsi  lua  mac  mac-development  machine  machine-learning  machinelearning  mahout  mail  mail.ru  management  marketing  math  mathematics  mba  memory  microisv  middleware  migration  minimalism  ml  mobile  monad  monads  money  music  mutable  mvc  naming  naming-convention  nested  network  newsgrounds  nim  nlp  nltk  norvig  nosql  notation  objective-c  oop  open-source  optimization  osx  osx-development  outsourcing  page-load-time  palm  paper  papers  parser  password  pattern  patterns  pay  pepper  performance  perl  philosophy  ping  pipe  playlist  politics  presentation  presentations  price  probabalistic  probabalistic-programming  probabilistic  probabilistic-programming  probability  product-development  product-manager  productivity  programmer  programmers  programming  prolog  protocol  pubsub  pubsubhubbub  pvc  python  question  quote  rails  rails3  ranking  rant  rating  realtime  recommendation  recruiting  redis  redlock  reference  reliability  remote  reputation  requirements  resources  rest  retry  reuse  rochio  rubberducking  ruby  ruby-cookbook  rust  saas  safety  salting  samples  scaling  scheme  scrum  security  sequence  server  settings  shorten  simplicity  sinatra  skills  slack  slow  slow-programming  smtp  snippet  snippets  social  socialmedia  software  software-architecture  software-design  software-development  software-engineering  solution  spi  stackoverflow  standford  startup  statistics  sudoku  svm  syndication  td-idf  tdd  testing  text-analysis  text-classification  text-mining  theory  think  thoughtworks  time  timezone  tinyurl  tips  todo  tolearn  tolisten  toread  tosite1  totry  trading  traffic  transaction  transport  tree  trees  tutorial  tutorials  twitter  uber  ui-design  unit  unix  upgrade  usability  video  visualization  webdesign  wikipedia  word-of-mouth  workflow  xml  zookeeper  _why 

Copy this bookmark:



description:


tags: