jm + coding   267

a regex-based, Turing-complete programming language. It's main feature is taking some text via standard input and repeatedly applying regex operations to it (e.g. matching, splitting, and most of all replacing). Under the hood, it uses .NET's regex engine, which means that both the .NET flavour and the ECMAScript flavour are available.

Reminscent of sed(1); see for an example Retina program
retina  regexps  regexes  regular-expressions  coding  hacks  dot-net  languages 
18 days ago by jm
httpbin(1): HTTP Client Testing Service
Testing an HTTP Library can become difficult sometimes. RequestBin is fantastic for testing POST requests, but doesn't let you control the response. This exists to cover all kinds of HTTP scenarios. Additional endpoints are being considered.
http  httpbin  networking  testing  web  coding  hacks 
27 days ago by jm
The Pixel Factory
amazing slideshow/WebGL demo talking about graphics programming, its maths, and GPUs
maths  graphics  webgl  demos  coding  algorithms  slides  tflops  gpus 
28 days ago by jm
You're probably wrong about caching
Excellent cut-out-and-keep guide to why you should add a caching layer. I've been following this practice for the past few years, after I realised that #6 (recovering from a failed cache is hard) is a killer -- I've seen a few large-scale outages where a production system had gained enough scale that it required a cache to operate, and once that cache was damaged, bringing the system back online required a painful rewarming protocol. Better to design for the non-cached case if possible.
architecture  caching  coding  design  caches  ops  production  scalability 
29 days ago by jm
The Algorithmist is a resource dedicated to anything algorithms - from the practical realm, to the theoretical realm. There are also links and explanation to problemsets.

A wiki for algorithms. Not sure if this is likely to improve on Wikipedia, which of course covers the same subject matter quite well, though
algorithms  reference  wikis  coding  data-structures 
4 weeks ago by jm
Sorting out graph processing
Some nice real-world experimentation around large-scale data processing in differential dataflow:
If you wanted to do an iterative graph computation like PageRank, it would literally be faster to sort the edges from scratch each and every iteration, than to use unsorted edges. If you want to do graph computation, please sort your edges.

Actually, you know what: if you want to do any big data computation, please sort your records. Stop talking sass about how Hadoop sorts things it doesn't need to, read some papers, run some tests, and then sort your damned data. Or at least run faster than me when I sort your data for you.
algorithms  graphs  coding  data-processing  big-data  differential-dataflow  radix-sort  sorting  x-stream  counting-sort  pagerank 
6 weeks ago by jm
Someone discovered that the Facebook iOS application is composed of over 18,000 classes. : programming

I just threw up a little.

See also , in which the FB Android devs happily reveal that they hot-patch the Dalvik VM at runtime to work around a limit -- rather than refactoring their app.
facebook  horrors  coding  ios  android  dalvik  hot-patching  apps 
7 weeks ago by jm
Preventing Dependency Chain Attacks in Maven
using a whitelist of allowed dependency JARs and their SHAs
security  whitelisting  dependencies  coding  jar  maven  java  jvm 
7 weeks ago by jm
Advantages of Monolithic Version Control
another Dan Luu post -- good summary of the monorepo's upside
monorepo  git  mercurial  versioning  source-control  coding  dependencies 
8 weeks ago by jm
Implementing Efficient and Reliable Producers with the Amazon Kinesis Producer Library - AWS Big Data Blog
Good advice on production-quality, decent-scale usage of Kinesis in Java with the official library: batching, retries, partial failures, backoff, and monitoring. (Also, jaysus, the AWS Cloudwatch API is awful, looking at this!)
kpl  aws  kinesis  tips  java  batching  streaming  production  cloudwatch  monitoring  coding 
8 weeks ago by jm
Testing without mocking in Scala
mocks are the sound of your code crying out, "please structure me differently!"

scala  via:jessitron  mocks  mock-objects  testing  testability  coding 
9 weeks ago by jm
A Tour Through Random Ruby
turns out Ruby has a good set of random-text-generation gems on offer
random  ruby  coding  text-generation  markov-chain  gems 
10 weeks ago by jm
Java lambdas and performance
Lambdas in Java 8 introduce some unpredictable performance implications, due to reliance on escape analysis to eliminate object allocation on every lambda invocation. Peter Lawrey has some details
lambdas  java-8  java  performance  low-latency  optimization  peter-lawrey  coding  escape-analysis 
11 weeks ago by jm
'A programming language based on the one liners of Arnold Schwarzenegger'. Presenting hello.arnoldc:

TALK TO THE HAND "hello world"

(via Robert Walsh)
via:rjwalsh  c  arnold-schwarzenegger  one-liners  funny  coding  silly  languages 
11 weeks ago by jm
a good collection of coding fonts (via Tony Finch)
via:fanf  fonts  coding  ui 
june 2015 by jm
Git team workflows: merge or rebase?
Well-written description of the pros and cons. I'm a rebaser, fwiw.

(via Darrell)
via:darrell  git  merging  rebasing  history  git-log  coding  workflow  dev  teams  collaboration  github 
june 2015 by jm
Evidence-Based Software Engineering

Objective: Our objective is to describe how software engineering might benefit from an evidence-based approach and to identify the potential difficulties associated with the approach.
Method: We compared the organisation and technical infrastructure supporting evidence-based medicine (EBM) with the situation in software engineering. We considered the impact that factors peculiar to software engineering (i.e. the skill factor and the lifecycle factor) would have on our ability to practice evidence-based software engineering (EBSE).
Results: EBSE promises a number of benefits by encouraging integration of research results with a view to supporting the needs of many different stakeholder groups. However, we do not currently have the infrastructure needed for widespread adoption of EBSE. The skill factor means software engineering experiments are vulnerable to subject and experimenter bias. The lifecycle factor means it is difficult to determine how technologies will behave once deployed.
Conclusions: Software engineering would benefit from adopting what it can of the evidence approach provided that it deals with the specific problems that arise from the nature of software engineering.

(via Mark Dennehy)
papers  toread  via:markdennehy  software  coding  ebse  evidence-based-medicine  medicine  research 
june 2015 by jm
For a Good Strftime
'Easy Skeezy Ruby Date/Time Formatting' -- or indeed anywhere else strftime() is supported
strftime  time  date  formatting  coding  ruby  via:oisin 
june 2015 by jm
Facebook Infer
New static analysis goodnews, freshly open-sourced by Facebook:
Facebook Infer uses logic to do reasoning about a program's execution, but reasoning at this scale — for large applications built from millions of lines of source code — is hard. Theoretically, the number of possibilities that need to be checked is more than the number of estimated atoms in the observable universe. Furthermore, at Facebook our code is not a fixed artifact but an evolving system, updated frequently and concurrently by many developers. It is not unusual to see more than a thousand modifications to our mobile code submitted for review in a given day. The requirements on the program analyzer then become even more challenging because we expect a tool to report quickly on these code modifications — in the region of 10 minutes — to fit in with developers' workflow. Coping with this scale and velocity requires advanced mathematical techniques. Facebook Infer uses two such techniques: separation logic and bi-abduction.

Separation logic is a theory that allows Facebook Infer's analysis to reason about small, independent parts of the application storage, rather than having to consider the entirety of the memory potentially at every step. That would be a daunting task on modern processors with their large addressable virtual memories.

Bi-abduction is a logical inference technique that allows Facebook Infer to discover properties about the behavior of independent parts of the application code. By storing these properties between runs, Facebook Infer needs to analyze only the parts of the software that have changed, reusing the results of its previous analysis where it can.

By combining these approaches, our analyzer is able to find complex problems in modifications to an application built from millions of lines of code, in minutes.

(via Bryan O'Sullivan)
via:bos  infer  facebook  static-analysis  lint  code  java  ios  android  coding  bugs 
june 2015 by jm
Orbit Async
Orbit Async implements async-await methods in the JVM. It allows programmers to write asynchronous code in a sequential fashion. It was developed by BioWare, a division of Electronic Arts.

Open source, BSD-licensed.
async  await  java  jvm  bioware  coding  threading 
june 2015 by jm
Testing@LMAX – Aliases
Creating a user with our DSL looks like: registrationAPI.createUser("user");

You might expect this to create a user with the username ‘user’, but then we’d get conflicts between every test that wanted to call their user ‘user’ which would prevent tests from running safely against the same deployment of the exchange.

Instead, ‘user’ is just an alias that is only meaningful while this one test is running. The DSL creates a unique username that it uses when talking to the actual system. Typically this is done by adding a postfix so the real username is still reasonably understandable e.g. user-fhoai42lfkf.

Nice approach -- makes sense.
testing  lmax  system-tests  naming  coding 
june 2015 by jm
A high-performance java build tool, from Facebook. Make-like
android  build  java  make  coding  facebook 
june 2015 by jm
Three Questions to Answer When Reporting an Error
Very long, but tl;dr:
the trick to creating an effective error message is to answer the 3 Questions within your message: What is the error? What was the probable cause of the error? What is the probable remedy?
errors  ui  ux  reporting  logging  coding 
may 2015 by jm
'The multiple repository tool'. How Google kludged around the split-repo problem when you don't have a monorepo.
kludges  git  monorepo  monorepi  google  android  aosp  repo  coding  version-control  dvcs 
may 2015 by jm
Input: Fonts for Code
Non-monospaced coding fonts! I'm all in favour...
As writing and managing code becomes more complex, today’s sophisticated coding environments are evolving to include everything from breakpoint markers to code folding and syntax highlighting. The typography of code should evolve as well, to explore possibilities beyond one font style, one size, and one character width.
input  fonts  via:its  typography  code  coding  font  text  ide  monospace 
may 2015 by jm
streamtools: a graphical tool for working with streams of data | nytlabs
Visual programming, Yahoo! Pipes style, back again:
we have created streamtools – a new, open source project by The New York Times R&D Lab which provides a general purpose, graphical tool for dealing with streams of data. It provides a vocabulary of operations that can be connected together to create live data processing systems without the need for programming or complicated infrastructure. These systems are assembled using a visual interface that affords both immediate understanding and live manipulation of the system.

via Aman
via:akohli  streaming  data  nytimes  visual-programming  coding 
may 2015 by jm
The Injector: A new Executor for Java
This honestly fits a narrow niche, but one that is gaining in popularity. If your messages take > 100μs to process, or your worker threads are consistently saturated, the standard ThreadPoolExecutor is likely perfectly adequate for your needs. If, on the other hand, you’re able to engineer your system to operate with one application thread per physical core you are probably better off looking at an approach like the LMAX Disruptor. However, if you fall in the crack in between these two scenarios, or are seeing a significant portion of time spent in futex calls and need a drop in ExecutorService to take the edge off, the injector may well be worth a look.
performance  java  executor  concurrency  disruptor  algorithms  coding  threads  threadpool  injector 
may 2015 by jm
'a command line tool that (hopefully) makes it easier to deploy, update, and test functions for AWS Lambda.' much needed IMO -- Lambda is too closed
aws  lambda  mitch-garnaat  coding  testing  cli  kappa 
april 2015 by jm
'Microservice AntiPatterns'
presentation from last week's Craft Conference in Budapest; Tammer Saleh of Pivotal with a few antipatterns observed in dealing with microservices.
microservices  soa  architecture  design  coding  software  presentations  slides  tammer-saleh  pivotal  craft 
april 2015 by jm
Static code analysis for shell scripts (via Tony Finch)
bash  cli  sh  linux  shell  coding  static-analysis  lint 
april 2015 by jm
AWS Lambda Event-Driven Architecture With Amazon SNS
Any message posted to an SNS topic can trigger the execution of custom code you have written, but you don’t have to maintain any infrastructure to keep that code available to listen for those events and you don’t have to pay for any infrastructure when the code is not being run. This is, in my opinion, the first time that Amazon can truly say that AWS Lambda is event-driven, as we now have a central, independent, event management system (SNS) where any authorized entity can trigger the event (post a message to a topic) and any authorized AWS Lambda function can listen for the event, and neither has to know about the other.
aws  ec2  lambda  sns  events  cep  event-processing  coding  cloud  hacks  eric-hammond 
april 2015 by jm
Rob Pike's 5 rules of optimization
these are great. I've run into rule #3 ("fancy algorithms are slow when n is small, and n is usually small") several times...
twitter  rob-pike  via:igrigorik  coding  rules  laws  optimization  performance  algorithms  data-structures  aphorisms 
april 2015 by jm
'Utilities that help bridge the gap between Java 8 and Google Guava. Guava has the {@link FluentIterable} concept which is similar to streams. In many ways, fluent iterable is nicer, because it directly binds to the immutable collection classes. However, on balance it seems wise to use the stream API rather than {@code FluentIterable} in Java 8.'
guava  java-8  java  fluentiterable  streams  fluent  coding 
april 2015 by jm
Stack Overflow Developer Survey 2015
wow, 52.5% of developers prefer a dark IDE theme?!
coding  jobs  work  careers  software  stack-overflow  surveys 
april 2015 by jm
On Ruby
The horrors of monkey-patching:
I call out the Honeybadger gem specifically because was the most recent time I'd been bit by a seemingly good thing promoted in the community: monkey patching third party code. Now I don't fault Honeybadger for making their product this way. It provides their customers with direct business value: "just require 'honeybadger' and you're done!" I don't agree with this sort of practice. [....]

I distrust everything [in Ruby] but a small set of libraries I've personally vetted or are authored by people I respect. Why is this important? Without a certain level of scrutiny you will introduce odd and hard to reproduce bugs. This is especially important because Ruby offers you absolutely zero guarantee whatever the state your program is when a given method is dispatched. Constants are not constants. Methods can be redefined at run time. Someone could have written a time sensitive monkey patch to randomly undefined methods from anything in ObjectSpace because they can. This example is so horribly bad that no one should every do, but the programming language allows this. Much worse, this code be arbitrarily inject by some transitive dependency (do you even know what yours are?).
ruby  monkey-patching  coding  reliability  bugs  dependencies  libraries  honeybadger  sinatra 
april 2015 by jm
Reactive Programming for a demanding world
"building event-driven and responsive applications with RxJava", slides by Mario Fusco. Good info on practical Rx usage in Java
rxjava  rx  reactive  coding  backpressure  streams  observables 
march 2015 by jm
Bug Prediction at Google
LOL. grepping commit logs for /bug|fix/ does the job, apparently:
In the literature, Rahman et al. found that a very cheap algorithm actually performs almost as well as some very expensive bug-prediction algorithms. They found that simply ranking files by the number of times they've been changed with a bug-fixing commit (i.e. a commit which fixes a bug) will find the hot spots in a code base. Simple! This matches our intuition: if a file keeps requiring bug-fixes, it must be a hot spot because developers are clearly struggling with it.
bugs  rahman-algorithm  heuristics  source-code-analysis  coding  algorithms  google  static-code-analysis  version-control 
march 2015 by jm
Google open sources a key part of their internal build system (internally called "Blaze" it seems for a while). Very nice indeed!
blaze  bazel  build-tools  building  open-source  google  coding  packaging 
march 2015 by jm
Combining static model checking with dynamic enforcement using the Statecall Policy Language
This looks quite nice -- a model-checker "for regular programmers". Example model for ping(1):

<pre>01 automaton ping (int max_count, int count, bool can_timeout) {
02 Initialize;
03 during {
04 count = 0;
05 do {
06 Transmit_Ping;
07 either {
08 Receive_Ping;
09 } or (can_timeout) {
10 Timeout_Ping;
11 };
12 count = count + 1;
13 } until (count &gt;= max_count);
14 } handle {
16 Print_Summary;
17 };</pre>
ping  model-checking  models  formal-methods  verification  static  dynamic  coding  debugging  testing  distcomp  papers 
march 2015 by jm
'Caffeine is a Java 8 based concurrency library that provides specialized data structures, such as a high performance cache.'
cache  java8  java  guava  caching  concurrency  data-structures  coding 
march 2015 by jm
Explanation of the Jump Consistent Hash algorithm
I blogged about the amazing stateless Jump Consistent Hash algorithm last year, but this is a good walkthrough of how it works.

Apparently one author, Eric Veach, is legendary -- : "Eric Veach is huge in the computer graphics world for laying a ton of the foundations of modern physically based rendering in his PhD thesis [1]. He then went on to work for Pixar and did a ton of work on Renderman (for which he recently got an Academy Award), and then in the early 2000ish left Pixar to go work for Google, where he was the lead on developing AdWords [2]. In short, he's had quite a career, and seeing a new paper from him is always interesting."
eric-veach  consistent-hashing  algorithms  google  adwords  renderman  pixar  history  coding  c  c++ 
march 2015 by jm
Halcyon Days
Fantastic 1997-era book of interviews with the programmers behind some of the greatest games in retrogaming history:
Halcyon Days: Interviews with Classic Computer and Video Game Programmers was released as a commercial product in March 1997. At the time it was one of the first retrogaming projects to focus on lost history rather than game collecting, and certainly the first entirely devoted to the game authors themselves. Now a good number of the interviewees have their own web sites, but none of them did when I started contacting them in 1995. [...] If you have any of the giddy anticipation that I did whenever I picked up a magazine containing an interview with Mark Turmell or Dan [M.U.L.E.] Bunten, then you want to start reading.
book  games  history  coding  interviews  via:walter 
march 2015 by jm
Release Protocol Buffers v3.0.0-alpha-2 · google/protobuf
New major-version track for protobuf, with some interesting new features:

Removal of field presence logic for primitive value fields, removal of required fields, and removal of default values. This makes proto3 significantly easier to implement with open struct representations, as in languages like Android Java, Objective C, or Go.
Removal of unknown fields.
Removal of extensions, which are instead replaced by a new standard type called Any.
Fix semantics for unknown enum values.
Addition of maps.
Addition of a small set of standard types for representation of time, dynamic data, etc.
A well-defined encoding in JSON as an alternative to binary proto encoding.
protobuf  binary  marshalling  serialization  google  grpc  proto3  coding  open-source 
february 2015 by jm
how Curator fixed issues with the Hive ZooKeeper Lock Manager Implementation
Ugh, ZK is a bear to work with.
Apache Curator is open source software which is able to handle all of the above scenarios transparently. Curator is a Netflix ZooKeeper Library and it provides a high-level API, CuratorFramework, that simplifies using ZooKeeper. By using a singleton CuratorFramework instance in the new ZooKeeperHiveLockManager implementation, we not only fixed the ZooKeeper connection issues, but also made the code easy to understand and maintain.  
zookeeper  apis  curator  netflix  distributed-locks  coding  hive 
february 2015 by jm
Programmer IS A Career Path, Thank You
Well said -- Amazon had a good story around this btw
programming  coding  career  work  life 
february 2015 by jm
Why we run an open source program - Walmart Labs
This is a great exposition of why it's in a company's interest to engage with open source. Not sure I agree with 'engineers are the artists of our generation' but the rest are spot on
development  open-source  walmart  node  coding  via:hn  hiring 
february 2015 by jm
Our latest open source release from Swrve Labs: an Apache-licensed, SLF4J-compatible, simple, fluent API for rate-limited logging in Java:

'A RateLimitedLog object tracks the rate of log message emission, imposes an internal rate limit, and will efficiently suppress logging if this is exceeded. When a log is suppressed, at the end of the limit period, another log message is output indicating how many log lines were suppressed. This style of rate limiting is the same as the one used by UNIX syslog; this means it should be comprehensible, easy to predict, and familiar to many users, unlike more complex adaptive rate limits.'

We've been using this in production for months -- it's pretty nifty ;) Never fear your logs again!
logs  logging  coding  java  open-source  swrve  slf4j  rate-limiting  libraries 
february 2015 by jm
Nice looking static code validation tool for Java, from Google. I recognise a few of these errors ;)
google  static  code-validation  lint  testing  java  coding 
february 2015 by jm
Google Java Style
A good set of basic, controversy-free guidelines for clean java code style
style  java  google  coding  guidelines  formatting  coding-standards 
february 2015 by jm
A Quiet Defense of Patterns
Marc Brooker: 'When it comes to building working software in the long term, the emotional pursuit of craft is not as important as the human pursuit of teamwork, or the intellectual pursuit of correctness. Patterns is one of the most powerful ideas we have. The critics may be right that it devalues the craft, but we would all do well to remember that the craft of software is a means, not an end.'
marc-brooker  design-patterns  coding  software  teamwork 
february 2015 by jm
8 gdb tricks you should know (Ksplice Blog)
These are very good -- bookmarking for the next time I'm using gdb, probably about 3 years from now
c  debugging  gdb  c++  tips  coding 
january 2015 by jm
Your anonymous code contributions probably aren't
Scraping the work of successful contributors to the Google Code Jam competition, the researchers found that a mere eight training files with 70 lines of code each were enough to identify authors based in their syntactic, lexical, and layout habits.
anonymous  coding  open-source  google-code-jam  research  fingerprinting 
january 2015 by jm
Functional Programming Patterns (BuildStuff '14)
Good, and very accessible even for FP noobs like myself ;)
clojure  fp  functional  patterns  coding  scala 
january 2015 by jm
Are you better off running your big-data batch system off your laptop?
Heh, nice trolling.
Here are two helpful guidelines (for largely disjoint populations):

If you are going to use a big data system for yourself, see if it is faster than your laptop.
If you are going to build a big data system for others, see that it is faster than my laptop. [...]

We think everyone should have to do this, because it leads to better systems and better research.
graph  coding  hadoop  spark  giraph  graph-processing  hardware  scalability  big-data  batch  algorithms  pagerank 
january 2015 by jm
A Case Study of Toyota Unintended Acceleration and Software Safety
I drive a Toyota, and this is scary stuff. Critical software systems need to be coded with care, and this isn't it -- they don't even have a bug tracking system!
Investigations into potential causes of Unintended Acceleration (UA) for Toyota vehicles have made news several times in the past few years. Some blame has been placed on floor mats and sticky throttle pedals. But, a jury trial verdict was based on expert opinions that defects in Toyota's Electronic Throttle Control System (ETCS) software and safety architecture caused a fatal mishap.  This talk will outline key events in the still-ongoing Toyota UA litigation process, and pull together the technical issues that were discovered by NASA and other experts. The results paint a picture that should inform future designers of safety critical software in automobiles and other systems.
toyota  safety  realtime  coding  etcs  throttle-control  nasa  code-review  embedded 
january 2015 by jm
'Uncertain<T>: A First-Order Type for Uncertain Data' [paper, PDF]
'Emerging applications increasingly use estimates such as sensor
data (GPS), probabilistic models, machine learning, big
data, and human data. Unfortunately, representing this uncertain
data with discrete types (floats, integers, and booleans)
encourages developers to pretend it is not probabilistic, which
causes three types of uncertainty bugs. (1) Using estimates
as facts ignores random error in estimates. (2) Computation
compounds that error. (3) Boolean questions on probabilistic
data induce false positives and negatives.
This paper introduces Uncertain<T>, a new programming
language abstraction for uncertain data. We implement a
Bayesian network semantics for computation and conditionals
that improves program correctness. The runtime uses sampling
and hypothesis tests to evaluate computation and conditionals
lazily and efficiently. We illustrate with sensor and
machine learning applications that Uncertain<T> improves
expressiveness and accuracy.'

(via Tony Finch)
via:fanf  uncertainty  estimation  types  strong-typing  coding  probability  statistics  machine-learning  sampling 
december 2014 by jm
A Virtual Machine in Excel
'Ádám was trying his hand at a problem in Excel, but the official rules prohibit the use of Excel macros. In a daze, he came up with one of the most clever uses of Excel: building an assembly interpreter with the most popular spreadsheet program. This is a virtual Harvard architecture machine without writable RAM; the stack is only lots and lots of IFs.'
vms  excel  hacks  spreadsheets  coding 
december 2014 by jm
A causal profiler for C++.
Causal profiling is a novel technique to measure optimization potential. This measurement matches developers' assumptions about profilers: that optimizing highly-ranked code will have the greatest impact on performance. Causal profiling measures optimization potential for serial, parallel, and asynchronous programs without instrumentation of special handling for library calls and concurrency primitives. Instead, a causal profiler uses performance experiments to predict the effect of optimizations. This allows the profiler to establish causality: "optimizing function X will have effect Y," exactly the measurement developers had assumed they were getting all along.

I can see this being a good technique to stochastically discover race conditions and concurrency bugs, too.
optimization  c++  performance  coding  profiling  speed  causal-profilers 
december 2014 by jm
Working Effectively with Unit Tests
$14.99 ebook, recommended by Steve Vinoski, looks good
unit-testing  testing  ebooks  jay-fields  tests  steve-vinoski  coding 
december 2014 by jm
Java for Everything
Actually, I'm really agreeing with a lot of this. Particularly this part:
Programmers will cringe at writing some kind of command dispatch list:

if command = "up":
elif command = "status":
elif command = "revert":

so they’ll go off and write some introspecting auto-dispatch cleverness, but that takes longer to write and will surely confuse future readers who’ll wonder how the heck revert() ever gets called. Yet the programmer will incorrectly feel as though he saved himself time. This is the trap of the dynamic language. It feels like you’re being more productive, but aside from the first 10 minutes of a new program, you’re not. Just write the stupid dispatch manually and get on with the real work.

I've also gone right off dynamic languages for any kind of non-toy work.

Mind you he needs to get around to ditching Vim for a proper IDE. That's the key thing that makes coding in a statically-typed language really pleasant -- when graphical refactoring becomes easy and usable, and errors are visible as you type them...
java  coding  static-typing  python  unit-tests 
november 2014 by jm
ExecutorService - 10 tips and tricks
Excellent advice from Tomasz Nurkiewicz' blog for anyone using java.util.concurrent.ExecutorService regularly. The whole blog is full of great posts btw
concurrency  java  jvm  threading  threads  executors  coding 
november 2014 by jm
Flow, a new static type checker for JavaScript
Unlike the (excellent) Typescript, it'll infer types:
Flow’s type checking is opt-in — you do not need to type check all your code at once. However, underlying the design of Flow is the assumption that most JavaScript code is implicitly statically typed; even though types may not appear anywhere in the code, they are in the developer’s mind as a way to reason about the correctness of the code. Flow infers those types automatically wherever possible, which means that it can find type errors without needing any changes to the code at all. On the other hand, some JavaScript code, especially frameworks, make heavy use of reflection that is often hard to reason about statically. For such inherently dynamic code, type checking would be too imprecise, so Flow provides a simple way to explicitly trust such code and move on. This design is validated by our huge JavaScript codebase at Facebook: Most of our code falls in the implicitly statically typed category, where developers can check their code for type errors without having to explicitly annotate that code with types.
facebook  flow  javascript  coding  types  type-inference  ocaml  typescript 
november 2014 by jm
How “Computer Geeks” replaced “Computer Girls"
As historian Nathan Ensmenger explained to a Stanford audience, as late as the 1960s many people perceived computer programming as a natural career choice for savvy young women. Even the trend-spotters at Cosmopolitan Magazine urged their fashionable female readership to consider careers in programming. In an article titled “The Computer Girls,” the magazine described the field as offering better job opportunities for women than many other professional careers. As computer scientist Dr. Grace Hopper told a reporter, programming was “just like planning a dinner. You have to plan ahead and schedule everything so that it’s ready when you need it…. Women are ‘naturals’ at computer programming.” James Adams, the director of education for the Association for Computing Machinery, agreed: “I don’t know of any other field, outside of teaching, where there’s as much opportunity for a woman.”
history  programming  sexism  technology  women  feminism  coding 
november 2014 by jm
How I reverse-engineered Google Docs to play back any document's keystrokes « James Somers (
Excellent write-up of this little-known undocumented GDocs behaviour, an artifact of its operational-transformation sync mechanism
operational-transformation  ot  google  gdocs  coding  docs  sync  undocumented  reversing 
november 2014 by jm
Please grow your buffers exponentially
Although in some cases x1.5 is considered good practice. YMMV I guess
malloc  memory  coding  buffers  exponential  jemalloc  firefox  heap  allocation 
november 2014 by jm
A Teenager Gets Grilled By Her Dad About Why She’s Not That Into Coding
Jay Rosen interviews his 17-year-old daughter. it's pretty eye-opening. Got to start them early!
culture  tech  coding  girls  women  feminism  teenagers  school  jay-rosen  stem 
october 2014 by jm
a new "types for Javascript" framework, from the team behind Angular.js -- they plan to "harmonize" it with TypeScript and pitch it for standardization, which would be awesome.

(via Rob Clancy)
via:robc  atscript  javascript  typescript  types  languages  coding  google  angular 
october 2014 by jm
Cuckoo Filters
'In many networking systems, Bloom filters are used for high-speed set membership tests. They permit a small fraction of false positive answers with very good space efficiency. However, they do not permit deletion of items from the set, and previous attempts to extend “standard” Bloom filters to support deletion all degrade either space or performance. We propose a new data structure called the cuckoo filter that can replace Bloom filters for approximate set member- ship tests. Cuckoo filters support adding and removing items dynamically while achieving even higher performance than Bloom filters. For applications that store many items and target moderately low false positive rates, cuckoo filters have lower space overhead than space-optimized Bloom filters. Our experimental results also show that cuckoo filters out-perform previous data structures that extend Bloom filters to support deletions substantially in both time and space.'
algorithms  cs  coding  cuckoo-filters  bloom-filters  sets  data-structures 
october 2014 by jm
Falsehoods programmers believe about time
I have repeatedly been confounded to discover just how many mistakes in both test and application code stem from misunderstandings or misconceptions about time. By this I mean both the interesting way in which computers handle time, and the fundamental gotchas inherent in how we humans have constructed our calendar — daylight savings being just the tip of the iceberg.

In fact I have seen so many of these misconceptions crop up in other people’s (and my own) programs that I thought it would be worthwhile to collect a list of the more common problems here.

See also the follow-up:

(via Marc)
via:marcomorain  time  dates  timezones  coding  gotchas  calendar  bugs 
october 2014 by jm
« earlier      
per page:    204080120160

related tags

1980s  acceleration  acceptance-testing  acceptance-tests  actors  admin  advice  adwords  aes  age  agile  akka  alerting  algorithm  algorithms  allan-klumpp  allocation  amazon  android  angular  annotations  anonymous  aosp  aphorisms  api  apis  apollo-program  apple  approximate  approximation  apps  archie-mcphee  architecture  architecture-astronauts  archival  arnold-schwarzenegger  arrays  articles  ascii  assembly  async  atomic  atscript  austerity  automation  autosave  await  aws  backoff  backpressure  bash  batch  batching  bazel  bdd  ben-hughes  benchmarking  benchmarks  best-practices  big-data  big-o  binary  binary-tree  biology  bioware  bitcoin  bitrot  bits  blaze  block-oriented  bloom-filter  bloom-filters  book  books  bpf  branch  branch-prediction  branching  breakage  brogrammers  bsd  bst  buffers  bug-tracking  bugs  build  build-tools  building  business  c  c++  c++11  c-i  c=64  cache  caches  caching  calendar  callbacks  camry  cap  capn-proto  capnproto  cardinality  career  careers  cas  causal-profilers  cbc  cep  cheat-sheet  checklists  chef  children  chrome  chronon  clean-code  clearcase  cli  client-side  clion  clojure  closures  cloud  cloudwatch  cms  code  code-digger  code-review  code-reviews  code-smells  code-validation  code-verification  coderdojo  coding  coding-standards  collaboration  collections  columnar  combinatorial  communication  community  compatibility  compilation  compile  compiler  compilers  complexity  compression  computation  computational-biology  computer-science  computing  concurrency  config-files  configuration  consistent-hashing  const  constraint-solving  continous-integration  continuous-deployment  contracts  conversion  cork  corrupt  cost  counting-sort  craft  crash-only-software  crashing  crdts  cron  crypto  cryptography  cs  csail  csharp  css  ctr  cuckoo-filters  cucumber  cuda  culture  curator  currency  cyclomatic-complexity  cyoa  dalvik  dashcode  data  data-oriented-programming  data-processing  data-structures  databases  date  dates  david-ungar  deadlocks  debt  debugger  debugging  decay  demos  dependencies  dependency-injection  deploy  deployment  deplyment  design  design-patterns  dev  dev-culture  development  devops  differential-dataflow  disk  display  disruptor  dist-sys  distcomp  distributed  distributed-locks  distributed-systems  djb  dmitry-vyukov  docs  don-eyles  dot-net  doug-lea  download  dry  dsl  dsls  dublin  duct-tape  dvcs  dvr  dynamic  ebooks  ebse  ec2  ecb  ecc  eclipse  economics  economy  editors  education  eiffel  elitism  embedded  embedded-systems  emulation  encapsulation  encryption  engineering  engines  entropy  eric-hammond  eric-veach  erlang  error-checking  errors  escape-analysis  essay  estimation  estonia  etcs  etsy  event-processing  event-sourcing  events  eventual-consistency  evernote  evidence-based-medicine  evolution  excel  exceptions  executor  executors  experts  exploits  exponential  exponential-backoff  extensions  facebook  fail  false-positives  fault-tolerance  feature-team  feminism  file-formats  final  finance  findbugs  fingerprinting  firefighting  firefox  firmware  fixing  flake8  flatbuffers  flickr  float  floating-point  flow  fluent  fluent-interfaces  fluentiterable  font  fonts  formal-methods  formats  formatting  fortran  fp  free  frequency-tables  frp  fsm  functional  functional-programming  funny  futures  fuzzy-matching  g1  ga  games  gaming  garbage-collection  gc  gdb  gdocs  geek  gems  genetic-algorithms  gerrit  gil  gil-tene  giraph  girls  git  git-log  github  gmail  go  google  google-code-jam  google-drive  gotchas  goto  goto-fail  gpu  gpus  gradle  graph  graph-processing  graphics  graphite  graphs  grpc  guardian  guava  guidelines  hacker-news  hackers  hacking  hacks  hadoop  hardware  hash-tables  hashing  hashtables  hax  hdr  head-mounted-display  heap  hero-coder  hero-culture  heuristics  hex  hijack  hiring  histogram  history  hive  hll  hmac  hobbies  honeybadger  honeypots  horror  horrors  hot-patching  hotdog  hotspot  html  http  httpbin  https  humor  hyperloglog  i7  i14y  iblt  ibm  ide  idea  ides  immutability  incident-response  indexing  inept  infer  injector  input  instrumentation  integers  integration  intel  intel-core  intelli-j  intellij  interactive  intercom  interfaces  internet  interoperability  interpreters  interviews  invalid  invariants  ios  iphone  irb  ireland  james-hamilton  jar  jargon  java  java-8  java8  javascript  jay-fields  jay-kreps  jay-rosen  jeff-atwood  jemalloc  jenkins  jersey  jetbrains  jetty  jgc  jitter  jobs  joel-spolsky  john-carmack  jokes  jpl  jpmorgan  jq  js  js1k  json  justin-bieber  jvm  jwz  k-8  kafka  kappa  kernel  kids  kinesis  kludges  knowledge  kpl  lambda  lambdas  language  languages  latency  laws  learning  lectures  legal  leonard-richardson  let-it-fail  libraries  library  life  lifecycle  like  linkedin  lint  linux  linux-journal  lisp  live  lmax  load-balancing  lock-free  locking  locks  lockstep  log  log4j  logging  loglog  logs  london-whale  lookup3  low-latency  lua  lucene  machine-learning  macros  magic  majority  make  makefiles  malloc  mame  management  marc-brooker  markov-chain  marshalling  martin-fowler  martin-thompson  mathematics  maths  matrix  maven  mdd  measurement  measuring  mechanical-sympathy  medicine  meebo  memory  mercurial  merging  messaging  metrics  microreboot  microservices  microsoft  migration  minecraft  misra-c  mit  mitch-garnaat  mobile  mock-objects  mocking  mocks  model-checking  models  money  monitoring  monkey-patching  monorepi  monorepo  monospace  mozilla  mtgox  multicore  multiprocessing  murmurhash  mutexes  mysql  naming  nasa  nbta  ncsu  neologisms  netflix  netty  network  networking  node  node.js  nostalgia  numbers  nytimes  o(1)  observable  observables  ocaml  ohurley  one-liners  one-pass  oo  oop  open-source  openbsd  openssl  operational-transformation  ops  optimization  option  organisations  osx  ot  ouch  overengineering  packaging  pagerank  pair-programming  papers  parallel  parallelism  partitions  patents  patterns  paul-krugman  pdf  peer-pressure  percentiles  percona  performance  periodic  persistence  peter-lawrey  philosophy  pickling  ping  pipelines  pipes  pivotal  pixar  play  plos  politics  postgres  poul-henning-kemp  preconditions  premature-flexibilization  presentations  printf  private-keys  probabilistic  probability  process  processors  production  profiling  programming  programming-languages  project-management  prophet  proto3  protobuf  protobufs  protocol-buffers  protocols  provisioning  proxies  pt-query-digest  pthreads  puzzles  python  q-digest  qa  qnx  quake-3  quality  quantiles  quants  querying  questions  queue  queues  quotes  race-and-repair  radix-sort  rafe-colburn  rahman-algorithm  rails  rake  ram  random  randomness  rants  raspberry-pi  rate-limiting  reactive  real-time  realtime  reasoning  rebasing  record  recordinality  recovery  recruiting  redis  redo  refactoring  reference  reform  refs  refuctoring  regexes  regexps  regular-expressions  relearning  release  reliability  remote  remote-work  renderman  repl  replay  replication  repo  reporting  repository  reputation  research  rest  restful  retina  retries  reversing  revert  reviews  rips  rob-pike  ross-anderson  rpc  rr  rsa  rspec  rtos  ruby  rubygems  rules  rust  rusty-russell  rx  rxjava  s3  safety  sampling  sbe  scala  scalability  scalatest  scaling  schemas  school  schools  science  scm  script  scripting  scrum  sd  sde  sde-fundamentals  search  searching  security  sed  semantics  semaphores  senior  serialization  server  server-side  services  set  set-cover  sets  sexism  sh  sharding  shell  shell-scripts  shellcode  side-channels  silicon-valley  silly  simd  sinatra  sip  sketching  skills  skiplists  slang  slf4j  slides  sns  soa  society  software  software-development  solver  sorting  soundcloud  source-code  source-code-analysis  source-control  space  space-saving  spacex  spaghetti-code  spark  specifications  speech  speed  spores  spreadsheets  spy-hunter  sql  ssds  sse  ssh  ssl  stack-overflow  staffing  starcraft  static  static-analysis  static-code-analysis  static-typing  statistics  steak  stem  steve-vinoski  steven-skiena  storage  stout  strchr  stream-processing  streaming  streams  strftime  string-matching  string-search  stringly-typed  strings  strlen  strong-typing  strstr  students  studies  style  succinct  succinct-encoding  surveys  sux  swpats  swrve  symbol-alphabets  sync  synchronization  syntax  sysadmin  system-tests  systems  tags  takedowns  tammer-saleh  tcpdump  tdd  teaching  teams  teamwork  tech  tech-debt  techdirt  technology  tee  teenagers  telecommuting  testability  testing  tests  text  text-generation  text-matching  tflops  the-duck  thomas-ptacek  thread-safety  threading  threadpool  threads  threadsanitizer  throttle-control  time  time-warp  timecop  timezones  timing  tips  tls  tools  top-k  toread  toyota  trac  trading  transactions  trees  tricks  tridge  tries  try  tuning  turing-complete  twisted  twitter  type-inference  types  typescript  typography  ui  uncertainty  undocumented  unit-testing  unit-tests  unix  usa  user-scripts  ux  vagrant  valgrind  validation  value-at-risk  varnish  verification  version-control  versioning  via:akohli  via:ben  via:bos  via:cjhorn  via:cliffc  via:darrell  via:fanf  via:hn  via:iamcal  via:igrigorik  via:its  via:janl  via:jessitron  via:jzawodny  via:marc  via:marcomorain  via:markdennehy  via:Mozai  via:nelson  via:norman-maurer  via:oisin  via:peakscale  via:preddit  via:proggit  via:rjwalsh  via:robc  via:sergio-bossa  via:tom  via:twitter  via:walter  video  vietnam  vim  virtual-clock  vision  visual-programming  vms  vnc  volatile  walmart  web  web-services  webgl  whitelisting  wikis  witchcraft  women  work  workflow  workflows  wtf  x-stream  xp  yagni  youtube  zerg-rush  zookeeper 

Copy this bookmark: