web developer & system programmer

coder . cl

ramblings and thoughts on programming...

if you pay peanuts, you get monkeys

published: 21-09-2012 / updated: 21-09-2012
posted in: development, programming, projects, tips
by Daniel Molina Wegener

How many times did you get an “amazing job offering from an amazing company with an amazing environment, but they want the cheapest employee that they can get”. I have stopped trying to handle that kind of job offerings. Also, I am filtering all of them. Specially that job announce where you read in emphasis “market reference salary”. If they are expecting to pay an average salary, why should I work for them if am over the average? I am a real polyglot programmer that can handle more than three programming language paradigms and over 10 programming languages, and my understanding of programming goes much over the average.

how I won my latest project

published: 19-09-2012 / updated: 19-09-2012
posted in: development, programming, projects, python, tips
by Daniel Molina Wegener

As freelancer I am constantly looking for new projects. Sometimes is hard to find good projects, mainly because not all customers are technical customers, making hard to communicate some aspects of the project, among other stuff like programmer evaluation, without too much technical evaluation, mostly based on his accreditations. One of my latest projects was earned by handling a programming problem on the middle of the interview, I was using Skype to share my screen and allow the customer to review the source code and watch me how I was solving the problem. That was great.

choose C or C++

published: 18-09-2012 / updated: 18-09-2012
posted in: c, c++, development, haskell, programming, tips
by Daniel Molina Wegener

How to choose between C and C++?. The answer is pretty clear. C allows powerful data type abstractions using three star and two star pointers, C++ only allows one star pointers. Also void pointers on C are more powerful once you try to pass abstract parameters to functions and procedures. The abstractions on C++ are built on top of virtual classes and templates, not its data types as C does. So, if you need to create complex data types, for example to handle hardware buffers, you should use C rather than C++, but if you want to create abstractions to manage real life objects, an object oriented interface like C++ does have is pretty good, enough to support almost any object oriented abstraction that you want to implement.

dynamic control on state machines

published: 14-09-2012 / updated: 14-09-2012
posted in: c, c++, development, programming, proview, tips
by Daniel Molina Wegener

We are doing pretty good advances on the ICS/DCS that we are doing. The current code base is using the STL std::priority_queue as operation request queue, but we are changing the task request priority each time that the communication channel is being used by any transition that requests the Profibus channel. We cannot saturate the communication channel with requests, because it runs on a very low bandwidth connection, so each request should be correctly measured, where all operations on the machinery is being directed by states machines with dynamic priorities of execution, and the STL priority queue is doing a good job. But was a little bit complex to think in terms of source code with the model presented as state diagrams and flow control diagrams on a whiteboard, and took me about one week to finish the final skeleton of the primary source code.

start building products

published: 12-09-2012 / updated: 12-09-2012
posted in: development, programming, projects, tips
by Daniel Molina Wegener

If you drive a company and his main business is development as service, have you ever thought on building products?. If you cannot cover the real cost of building a product with your current utilities and you have a well known market where to sell the product, you can start searching for investment, because you have several options to start building a product. You already know developers that you know that can do the product, you already know the market, and you just need to think a little bit more on the product to start building it, and start searching for investment. If you are not capable of do something as searching for investment, you are not probably good enough to make business. There is a related post that I loved, which also I am using as guide to answer many questions related to similar communications that I receive, which is entitled “Dear Programmer, I have an idea”, where the developer as final answer has four key points to review before asking for help on building a project, where he answers “So, either you need to:”

learn programming seriously

published: 11-09-2012 / updated: 11-09-2012
posted in: development, programming, tips
by Daniel Molina Wegener

Programming is not a mere subject on the “purpose of programming is to create a set of instructions that computers use to perform specific operations or to exhibit desired behaviors”. Programming in fact is more than the simple understanding on how are placed those instructions on source code, there several concepts arranged on the source code, a statements like “avoid using continuations on your state machine” should be understood by the programmer. Also “externalize the closure as first order function” should be understood too. Those concepts if are not understood by the programmer, he will be speaking in terms of a novice programmer with a small set of programming courses and knowledge con computer science, so will be hard to communicate clear ideas about what are they programming.

scheduler using priority queues

published: 09-09-2012 / updated: 09-09-2012
posted in: c, c++, development, programming, projects, proview, tips
by Daniel Molina Wegener

As you know I am working on an Industrial Control System — ICS/DCS to be more specific — and this system requires a task schedule to activate some pumps with a very strict calendar, monitoring the amount of liquid that has been passed through the valve, and it should allow manual operations, interrupting the automatic operation of that node on the plant. This seems to be difficult to implement, as I wrote in past posts, we are using a priority queue that contains task requests, where every priority is entirely dynamic, and dependent on the state of the current state machine that is being executed according to the operation request.