Skip to main content

Posts

Showing posts from March, 2020

The ultimate code reuse

I already published Fake-Bot on Medium , where I describe my program declaratively, and the bot figures out the implementation. This takes away the red (or green?) of the red-green-refactor cycle. The article may suggest that this is thought on the unit-test-level - it isn't. It works on all the levels on the test pyramid. How does the Fake-Bot know how to make tests green? Either by a table-based approach or - more interesting - by searching in a database. In the latter version, there is a database with functions, classes, modules, services. The entries are indexed by inputs and outputs of the entity. When I declare my function by inputs and outputs, Fake-Bot searches the database and interests the code for me. Now comes the ultimate code reuse. Imagine I have an ecosystem like the npm-modules. But I don't have to be aware of which modules are available and which not. I neither have to integrate them manually. All this is done by a bot like it should be. I only state what I...

Wrapping Function: Project pixel to another image

In computer vision, it is essential that I am able to project pixels into other images. I can do this easily when I know the depth of the pixel, which is normally the case as I develop with RGB-D cameras. The idea is the following: 2D-Pixel + Depth -> 3D Point p -> [R|t] p -> 2D-Pixel in other Image The math is on page three of "Robust Odometry Estimation for RGB-D Cameras"

Metric Driven Development

I am currently implementing a SLAM algorithm. It contains many sub-algorithms like tracking, mapping, and loop closure. It never archives an exact result, therefore directly comparing the result against an oracle does not work. Some SLAMs are better than others. Some parts of one SLAM perform than some parts of others. I even can mix different parts of existing SLAM into a new one. And then, I didn't even start with configuring the system, which can make a lot of difference. I suggest, therefore, besides TDD on the micro-level, MDD - Metric Driven Development - on the macro-level. The scheme is related. I come up with metrics and build a harness for them. This means that I think about how to test the system before I start. Then I record sample inputs for the SLAM. The first result is as bad as it can be: it did nothing. From here, I start to develop. This is done for every part of the whole and the whole itself. Every metric has to show something meaningful.

Sources of Papers

The sources are the input of my process to understanding via a conceptual model. The quality and completeness directly influence the quality and completeness of my understanding. I can think of the following types of sources: Conferences Archives for a regular checkup Specific scientists Universities and departments within Companies that publish So how to come up with these sets of sources? In the beginning, I have no knowledge of the field at all, so I cannot even judge.  The easiest are the conferences for sure. Also, archives are simple if they have the desired category. From there, I have to look out for university companies and scientists, which are noted on the single papers. Observe who works with whom and build a graph.

Why has TDD be a discipline?

There where times where I was so proud of how disciplined I am. Nowadays I see the need for discipline as a failure of process. The process of how I come from ideas to business value in my flywheel. So why is testing still a discipline? First of all: I love TDD. I had many algorithms in the past I am sure, it would have cost me hours of developing. But by doing one concrete example after the other explained by a test together with keyboard golf and refactoring the algorithm just emerged. With profiling and measuring, I also get it very fast if required without having to worry about the functional aspect of the algorithm. These moments are pure joy. So why is testing still a discipline? The requirements are not clear most of the time. This lies in the nature of my tasks. I just have to deliver customer value, but don't know exactly how.

TDD for my conceptional framework

I have the feeling that I can use skills from test-driven-development to build a conventional framework for organizing scientific papers. The name TDD is very bad, as I don't write tests, and the result is more related to architecture than programming as it regards the organization of files, not the creation of the content of them. Anyway, let's try it. I start with a problem in mind without knowing how to solve it. I also lack knowledge of the required area. The plan is to build this knowledge trough papers. Let's start. I start with an empty framework. It is the simplest one possible and can represent nothing. I pop the first paper form the queue. How this queue is filled is another topic, but it represents all relevant papers. I give the paper a category. Still, rather simple as it does not have to fit I pop the next one I connect it with an existing category or add it to the current category I refactor, which means splitting, reorganizing, and so on so that th...

How to represent a conceptual framework?

My conceptual framework has several characteristics: There is flow in the system means the order of active components per piece while running There is a static structure. There are dependencies There are hierarchies Different dimensions, for example, the hardware environment The hierarchies make it complicated to use a directed graph with different arrows. Nevertheless, there are nodes and arrows between them.  The solution is that a node in the directed can contain another directed graph. If an inner node has a dependency on a node that is not in the same parent-node, the parent-node gets an addiction to the other node on the same level on the hierarchy.  How to display this?  Zooming: Child-Graphs are not shown. I have to click on the parent first and get the child graph presented Grouping: Within a node, there can be other nodes and edges. It makes sense to split the declaration from the visualization and let, e.g., Graphviz handle the latter. ...

Sourcing new papers

In principle, there are two ways I source new papers. Both with advantages and disadvantages Following the graph of papers Take a paper that solves a problem directly or kind of. Read the related work and work on which the paper builds upon. Follow the references. They build a graph of papers. You can easily say from the context whether the papers are relevant or not. This is a very efficient way of finding new relevant papers. The problem is that this directed graph always points back in time and never forward. Therefore a big part of the whole graph of papers is not accessible to you. The latest research lies here, and you cannot find it this way. Following the latest publication Catching up with the latest publications is hard. In many ways. Where to find them? How to access them? How to handle the load of it? I don't need most of the newly published scientific papers. Also, even they are in the right area and would help conventionally, I cannot distinguish if it is a d...

How to manage my reading queue

My reading queue can get quite large. Hundreds of scientific papers. How to organize them? I build a conceptual framework that determines which topics relate to others and to my current situation or problem I am solving. Then I group the papers in these categories. On the one hand, the framework determines what to read first. On the other hand, I do a breadth-first reading as additional knowledge alters the framework.

Important Skill: Scan and Filter important papers

Every day hundreds of papers are published that could directly or indirectly influence my work and worldview. Only a small subset is really relevant. To find them I have to review them. Finding sources, processing them, scanning them and finally filtering them as fast as possible is a crucial step before the attempt to understand the remaining papers.

Archive my papers

For every paper, save in a structured and searchable way: Title Day of discovery Read from to My own keywords Keywords of the author if available The abstract of the author My own abstract The introduction of the author.

The (silently) spoken abstract

It is an excellent exercise to create spoken abstracts of the paper. The beauty lies in the really fast cycle-time. I will encounter very fast which parts you did not understand. I can think about them or look them up in the paper. Brief notetaking can work well as well while I am speaking. A nice side-effect is that you can do this exercise while you are bored. These cycles will converge. Now is a good time that I write my abstract and compare it.

How to read a paper?

Understanding papers fast and completely is an essential skill of mine. This is a living document of my strategy: Skim the intro. Seems it relevant? Skim the abstract without understanding. Seems it relevant?  Print the paper Skim the headlines. Do they and the order make sense?  Read the introduction Read it again What is the paper about?  I sketch out some possible solutions that come to my mind Work through the related work: Check at least the title of every reference here. Normally the paper builds only one or two main-references. Skim them. Extend your own solutions Read the paper without understanding to get a feeling for the context Read the sections of the paper Write an abstract Compare your abstract to the abstract of the paper that you read for the first time. Check why it is different.

Converence check

Check regularly these conferences and their papers: Calendar of Computer Image Analysis, Computer Vision Conferences ECCV: European Conference on Computer Vision ICCV: International Conference on Computer Vision CVPR: Conference on Computer Vision and Pattern Recognition Computer Vision Foundation Other resources Arxiv: Computer Science > Computer Vision and Pattern Recognition

How to detect the opportunity for disruptive innovation?

Much was said about the innovators' dilemma. But for me it is still hard to distinguish between disruptive innovation from non-disruptive in the present. Looking back on past ones it seems clear to me. In the disruptive innovation lies great opportunity as a single person can innovate in a holistic way with relatively small money. But still, it is a bet. Disruptive innovation is an extension to the hedgehog concept.

Why Should I measure myself?

Why should I measure myself?  To improve? I can't work more. It is an illusion. The cost in form of burnout (not the burnout) ist not observable but there. Getting interesting things done is not a race on a predefined track but an exploration. Instead of measuring I hear to myself.

Liveness Test

A simple liveness test. $ cat liveness.sh #!/bin/bash status="ok" while : do res=$(curl -sL -w "%{http_code}\\n" $1 -o /dev/null) expeced="200" date=`date +%Y-%m-%d_%H:%M:%S` if [ "$res" == "$expeced" ]; then echo -e "$date \t $res \t ok" status="ok" else echo -e "$date \t $res \t error" if [ "$status" == "ok" ]; then $2 fi status="error" fi sleep 2 done Call it via: ./liveness.sh http://localhost:3000 ./handle_server_down.sh Deploy on Raspberry Pi or a server.

Required Skills

I need the skills to: Learn and understand that a problem exists Understand a problem Find existing solutions (conceptional) Understand existing solutions (conceptional) Combine new solutions (conceptional) Implement the solutions Connect a conceptional solution to an implementation I also need these meta-skills: Order the skills in the right loops Do them hierarchically There are hierarchical loops with the elements above. So these are 3D-Loops - most books only print 2D ones.

Reals World Coding Katas

Most examples in books and coding katas lack the similarity to reals world problems and feel artificial. But the solution is very simple. I Reflect on my day and decide, which problem is suitable for a kata. I write the commit hash in a document and a short comment. Now I have a set of real-world katas. I clone the project in a separate folder and check out the commit I remembered. No setup required as my computer already is fully set up by definition. A separate branch would certainly work as well. I choose the kata with these criteria:  Either a 100%-All-Day-Problem that I am facing all the time (good to improve) or one that goes in the direction I want to go (good to evolve) The original solution took me max twice as long as I want to do my kata. So about an hour long.

How to order functions in source code?

When writing code a tree of functions emerges. I make sure, that each level of that tree is on the same level of abstraction. Source files are linear. So how to linearize that tree? It turns out that a depth-first approach is easier to write and a breadth-first approach is easier to read. The latter it groups the function on same level of abstraction together. Jumping via a ctrl+click removes all the downsides. So write functions in depth-first and refactor to breadth-first. Someday I will write a tool that reorders from on the other. This makes extending easier - regarding the order of the functions.

Most care about the wrong programming languages

Much is said in which programming language is the best. I really don't understand this debate. All are OK. In the end, they are not the bottleneck. Some are better than others in different contexts. But not too much. But I really wonder, why nobody discusses the language, that is really different enough to deserve a debate and momentum that some more folks learn them. OpenCL, OpenGL, Verilog . They are different enough to deserve a debate. All the debate I hear these days (Java vs. Go vs. Python vs. Elixir vs. dozens of alternates) are boring and lead to nothing

Rapid Feeback Driven Development

Rapid Feedback Driven Development. The length of the feedback-loop is inversely correlated to the paths I can explore in the possibility tree. Programming is an exploration. So faster feedback is better exploration is better programming. All the techniques I like (TDD, ...) are instances of Rapid Feedback Driven Development. The union set of situations I can apply them are a subset of the situations where I can apply RFDD.

Gathering Work Awareness

Thinking about how @KentBeck wrote Smalltalk Best Practice Patterns — he went meta at every step of real work and asked “What did I just do? Have I done this before?” Trying the same on some shaping work. Not just sketching, but annotating each false step and corrective measure. -- Ryan Singer For me, these two questions are not enough. Why do I do the task and nobody else - like a library programmer? What am I doing right now? Why now? What did I do it before, what next? Why I am doing what I am doing right now?  How do I do it? Why does it the way I do it? Would an alien do it other? What would the alternatives be? What is the broader context of the current step? The ability to reflect correlates with the skill of a person. How to gather information? Do micro-steps and micro-commits in Git. Reflect on every commit on the questions above and link them with the commits. If it is a side-project I may want to write directly in the commit messages. This exercise i...

A paper a day

One scientific paper a day would be great to consume. Maybe someday, but for now I not good enough for this. A paper or two per week works for me. I could use the morning paper but there I cannot select what I want to read. Anyway, I should read it.

Choose Projects you do NOT do!

Inspiration from FluentC++ Choose which project NOT to work on. Be clear what you want and which projects are toxic. Keep the Hedgehog-concept in mind. Be sure that you are a) deeply passionate about the project b) the project can be the best in the world quality c) you can earn money with it If one of the three points is not met and not realistic soon don't do the project. Play around with it privately. Maybe you can pivot there so that it meets the criteria.

Creativity = Know many elements and connect them in two different steps

“that an idea is nothing more nor less than a new combination of old elements.” Webb Young in A Technique for Producing Ideas found on HBR This means to be creative I must: a) Know as many elements as possible. Learn as much as I can b) Take creative time to connect the dots The possibilities are endless. By pure thinking I considering near nodes in the graph, by dreaming far ones. Steve Jobs: “Creativity is just connecting things. When you ask creative people how they did something, they feel a little guilty because they didn’t really do it, they just saw something. It seemed obvious to them after a while. That’s because they were able to connect experiences they’ve had and synthesize new things.” Could do, but currently, I don't: When I am forced to be creative because I have a task to do: Dump down facts that could be in the area on index cards and connect them. Shuffle a lot.