Archives for Languages

Javascript snippet: “asUtfCodes” function

Sometimes I need to include escaped string sequence to my code (mostly for unit tests), because clearcase (VCS I forced to use by my current employer) chokes when it encounters UTF-8 -encoded source code. In order to make my life easier, I wrote a small function that transforms a given input string to it’s escaped [...]

Memory overhead in Java

Quite an interesting question: how much is the overhead that is introduced by JVM itself? In other words how much is the memory cost of using byte code execution engines in comparison to plain old C/C++ compilers that produces zero-overhead native code? Well, in case of Java an internal overhead of plain Object is 8 [...]

Design patterns in a functional way

In this post I’ll collect articles related to practical applications of the design patterns in functional programming languages. Design Patterns in Haskell

Inheritance is evil

Quite an interesting article related to overusing inheritance pattern. Upd: Related problem with JDK’s Properties class. (Ru) Discussion related to composition vs inheritance. (Ru) Discussion “shall we drop inheritance support?”.

Opposite idiomatic words

Useful idiomatic words that are frequently used in programming, e.g. “get/set”, “insert/delete”, etc.

K Language

One another language that looks quite weird at a first glance but promises to be damn effective.

Succinctness is power

Quite an interesting hypothesis of Paul Graham: My hypothesis is that succinctness is power, or is close enough that except in pathological examples you can treat them as identical. It seems to me that succinctness is what programming languages are for. Computers would be just as happy to be told what to do directly in [...]