python dict serialize – 2 ways

import pickle
print pickle.dumps(myDict)

import json
print json.dumps(myDict, indent = 4)

# to verify
print eval(  json.dumps(myDict)  ) == myDict


which programming languages changed toooo much

No elaboration please. Pointers will do.

perl 6?
python 3?  but the excessive changes are not taken up!
php5 was better received.
C# ?
MFC -> winforms -> WPF ? Different technologies. More like delphi/powerBuilder/coldFusion declining than a language evolving.
java 8? not much change. Lambda is the biggest
c++11? not much change. Rval ref is the biggest

overvalue ^ undervalued in tech IV – random picks

–overvalued – 10 items unranked:
problem solving with comp science constructs — mostly algos
fast coding
code quality – in those take-home coding tests
corner cases
OO design theories, principles
–undervalued practical skills:
stackoverflow type of know-how, including syntax details. These aren’t quizzed in high-end interviews.
tools including IDEs
[T] bug hunting
[T] large code base reading
[T] reading lots of documentation of various quality to figure out why things not working
[T = hard to test in IV]

java8 default method breaking backward compatibility

Among the java8 features, I think default  method is a more drastic and fundamental change than lambda or stream,  in terms of language
–Based on P171 [[Mastering Lambdas]]
Backward compatibility (BWC) means that when an existing interface like includes a brand new default method, the existing “customer” source code should work as before.Default methods has a few known violations of BWC.

* simplest case: all (default) methods in an interface must be public. No ifs or buts.  Suppose MyConcreteClass has private m2() and implements MyIntf. What if MyIntf now gets a default method m2()? Compilation error!

* a more serious case: java overriding rule (similar to c++) is very strict ( so m(int) vs m(long) is always, automatically overloading not overriding.  Consider myObj.m(33). Originally, this binds to the m(long) declared in the class. Suppose the new default method is m(int). Overloads. This is a better match so selected by compiler (not JVM runtime). Breaks backward compatibility.

This excellent thin book gives 2 more cases…

linker error in java – example

[[mastering lambda]] points out one important scenario of java linker error. Can happen in java 1.4 or earlier. Here’s my recollection.

Say someone adds a method m1() to interface This new compiled code can coexists with lots of existing compiled code but there’s a hidden defect. Say someone else writes a consumer class using, and calls m1() on it. This would compile in a project having the new but no Again, this looks fine on the surface. At run time, there must be a concrete class when m1() runs. Suppose it’s a HashSet compiled long ago. This would hit a linker error, since HashSet doesn’t implement m1().


oldest programmer in a team, briefly

I’m unafraid of being the oldest programmer in a team, for example in China or Singapore, as long as I’m competent. If my foundation is strong and I know the local system well, then I will be up to the challenge. It takes an amount of effort to gain the local system knowledge though. Consider GS, Citi, OC, Stirt and CFM.

More than half the times, contractors aren’t required to  gain that much local system knowledge.

Actually, Can be fun and stimulating to work with young programmers. Keeps me young. My experience might add unique value, if it’s relevant.

I can think of many Wall St consultants in this category.

## once-valuable skills – personal xp

perl – lost to python
tomcat, weblogic, jboss
apache, mysql
dns, unix network config
autosys – not used after GS
[$] sybase, oracle – after ML edge project I didn’t need it again.
[$] VBA – used once only. But Excel is going strong!

[$ = still has value]

–random list (not “top 10”) of longevity skills
eclipse, MSVS
Excel and add-in
STL, boost
javascript, though I don’t use it in my recent jobs
Linux shell
compiler skills
make, msbuild
bash and DOS batch scripting, even though powershell, vbscript and python/perl are much richer.