Creating A Chart With A Logarithmic Axis In Incanter 1.5.1
Update: Pushed improved version to Incanter.
This is how our final code will look like:
;; core and charts are the incanter namespaces
(defn plot-power []
(let [fun #(Math/pow 10 %)
y-axis (log-axis :label "log(x)")
chart (charts/function-plot fun 0 5)]
(set-axis chart :y y-axis)
(core/view chart :window-title "LogAxis Test: Incanter fun plot")))
Continue reading →
The Invisible Benefits Of Pair-Programming: Avoiding Wasteful Coding Excursions
My main point is that by working with another person that you have to justify your plans to, you can be saved from pursuing suboptimal or unnecessary solution, thus considerably reducing both time spent and lines of code produced (more talk, less [wasteful] code).
Continue reading →
Most interesting links of June '13
Recommended Readings
Agile, process, SW dev, people etc.Continue reading →
Brief Intro Into Random/Stochastic/Probabilistic/Simulation/Property-Based Testing
Random testing typically starts by creating (likely a very simplified) model of the system under test. The model is then used to generate the random data inputs and/or sequences of actions (method calls). Then the tests are executed and their input and output data captured. Finally the results are validated, either against predefined "system properties," i.e. invariants that should always hold true, or manually by the developer.
Related/also known as: generative testing, property-based testing (a paper).
Continue reading →
Patterns of Effective Delivery - Challenge Your Understanding Of Agile (RootsConf 2011)
The talk challenges the absolutism of some widely accepted principles of "right" software development such as TDD, naming, the evilness of copy&paste. However the challenge is in a positive way: it makes us think in which contexts these principles really help (in many) and when it might be more effective to (temporarily) postpone them. The result is a much more balanced view and better undestanding of their value. A lot of it is inspired by the theory (and practice) of Real Options.
What are Patterns of Effective Delivery?
- Patterns - strategies that work in a particular context - and not in another (too often we forget the context and to consider the context where a strategy doesn't work / is contra-productive); beware: a part of the context is the experience of the developer; for unexperienced devs it might be better to just stick to a process and applying TDD etc. all the time than trying to guess when they are appropriate and when not without having the experience to decide it right
- Effective - optimize for something: volume of SW produced? time to market? learning/discovery? certanity? user experience?
- Delivery - get stuff that is useful out of the door; software is not important, the utility it provides is; know why you write the SW to be able to get better at it
Continue reading →
Installing Latest Node.JS And NPM Modules With Puppet
- Install the puppetlabs-apt module
- Add ppa:chris-lea/node.js to apt
- Install nodejs
- Steal the npm provider from the puppetlabs-nodejs module
- Install a npm module
Continue reading →
Making Sense Out of Datomic, The Revolutionary Non-NoSQL Database
Why? Why?!?
As we shall see shortly, Datomic is very different from the traditional RDBMS databases as well as the various NoSQL databases. It even isn't a database - it is a database on top of a database. I couldn't wrap my head around that until now. The key to the understanding of Datomic and its unique design and advantages is actually simple.The mainstream databases (and languages) have been designed around the following constraints of 1970s:
- memory is expensive
- storage is expensive
- it is necessary to use dedicated, expensive machines
Continue reading →
Ignore requirements to gain flexibility, value, insights! The power of why
Continue reading →
Most interesting links of May '13
Recommended Readings
- ThoughWorks Technology Radar May 2013 - Maven replaced by Gradle, Clojure and Scala on adopt, big enterprise SW and WS-* out, lot of interesting stuff to adopt or assess
- Straw Man TDD: debunking 6 common TDD myths (via M.Fowler) - such as TDD = {no upfront design, 2*longer development, # hard-to-change test code}.
- Programmer Competency Matrix - a nice overview of a programmer needs to know in different areas (computer science: data structures etc., SW engineering: SCM etc., programming: defensive coding, IDE etc.) + what experience and knowledge they need, split into 4 levels. Where are you?
- The 12 most disruptive technologies of the next 10 years according to McKinsey - 1. mobile internet, 2. automation of knowledge work, 3. internt of things, 4. cloud, 5. advanced robotics, 6. [near-]autonomous vehicles, 7. next-generation genomics, 8. energy storage, 9. 3D printing, 10. advanced materials, ...; the full 178 page report.
- Your login form posts to HTTPS, but you blew it when you loaded it over HTTP - summary: without https, anybody between the server and the client can inject anything (e.g. a key logger) into the web page; exploit example
- Older Is Wiser: Study Shows Software Developers’ Skills Improve Over Time (from an analysis of StackOverflow)- and older developers have much broader skill set and know about subjects
Continue reading →
Tip: Include Context And Propose Solutions In Your Error Messages
"No matching selector for 'prod' at some_puppet_file.pp:31"
Continue reading →
Accessing An Artifact's Maven And SCM Versions At Runtime
(All credit goes to Markus Krüger and other colleagues.)
Continue reading →
Lesson Learned: Don't Use Low-Level Lib To Test High-Level Code
The case: I want to test that the method login sends the right parameters and transforms the result as expected. Login invokes post-raw which calls an HTTP method. Originally I have tried to test it by using the library clj-http-fake but it proved to be unnecessarily complex. It would be much better to fake post-raw itself for testing login and test the original post-raw and its HTTP interaction separately, using that library.
Continue reading →
Becoming A Better Programmer Through The Study of Good And Bad Code & Design
This is an experiment and I hope to hear from the community if this is something that can really help people or not. I would also love to get contributions from other developers, to cover a broader range of opinions and examples. Comments and contributions are welcomed and appreciated!
Continue reading →
Most interesting links of April '13
Recommended Readings
The top top article
Continue reading →
Book Review & Digest: Boyd: The Fighter Pilot Who Changed the Art of War (Relevant for IT/Business)
Continue reading →