For various Projects I thought it would be great to have a graphical programming language, that had cover all Javascript specialities. After I did something like that before. Where I wanted to build a AI simulation MMOG. Now I wanted to build it for more general purpose. When this works. It could work with a whide range of applications. Because today I would build it on top of babylon.js. Babylon would parse any Javascript-file and provide an AST(abstract source tree). The ast could easily get displayed with graphical components. and get changed and moved by drag and drop. When Changing a function or object definition all positions where this was used could automatically get changed.

with that setup, you could build apps, where the users could implement there own logic.

Let’s say you make a Jump and run. Then you tell the player to move left. the user tries. Then you open a message this method is not implemented jet, can you do it. so the user implements a method to move the hero. and then the user can do it for all hero actions. When the user is arriving at a closed door. The user could implement the toggle method to open and close the door. with a heros action.

A second example could be a data-management-app. Where the user would define macros and forms to input data in his most efficient way, without a need to a special adjusted app. he could just code the logic with moving blocks.

The possibilities are endless. before I looked ad scratch, which is a programming language that also can compile to Javascript. but this is not using the flexibility’s of javascript. second Scratch is implemented on a canvas. that makes it difficult to change the theme. So in all apps. it will look like a toy for children. if the components are displayed with HTML they could be styled easily using CSS. to look like an actual programming language, or more like blocks to move for the younger generation. I could even imagine, that it would be possible to build an IDE based on the Babylon abstract source tree.

how do you think about that Idea, should we start that project, to provide a general purpose graphical programming language supporting all the greatness of javascript?

Recently I found an interesting theory, that said that OOP is bad. The author Brian Will is showing many code examples, where OOP will never match the right criteria to solve a real world problems. As an alternative he prefer functional or procedural programming. His thoughts made be thinking a lot about good software design. And I decided to make a little HTML/javascript app, completely in functional style.

To do so, there are a few rules to follow. The simple ones are “no new and no this.” Next is “let data be data”. In object oriented programming you bind functionality to your objects, but now only plane simple objects get used as you create them using curly braces {}. The objects get used to structure the app-data and to namespace your functions.

Next I thought the abstraction of the DOM tReeact, that I developed serval months ago, where useful. Actually, when rendering a Template, that is happen in pure functional style. That made me render the UI using underscore-templates. tReeact has the Component-system, that let me handle the UI events.

The plan is now the Events will trigger some functions to change the data and course an re-rendering of the entire application ui. This approach has lead to a great separation of concerns. UI is defined in the templates, Events are handled in Components, the logic is implemented in functions, and the models are just plane data in a structured object-tree.

It has shown, that this way to build an app is very effective, the app is showing a good performance and the structure could easily scale to very complex applications.

The application is available at http://tobiasnickel.github.io/.
next time I will tell you why I made this app.

Over time software developer also develop a special sense in what conditions they can concentrate best. Some programmer need it absolutely silent, such as the linux inventer Linus Torvalds. But for me that is nothing. Because there is always something. When it is to quiet, I will listen to my own breath or some neighbors do anything. Then I listen to them. I found that even more distracting then having music running.

situations

From situation to situation I listen to very different music. That made me get used to say, I am listening to good music. Because I like music from electro, classic, rock/metal and hiphop/rap. Texts can really lead make an average song great. When programming of course I don’t want to get distracted. So when coding I like to listen to radio paradise. I don’t know any song they are playing, but it sounds good. An other way I use to not get distracted, is listening one song in a loop. For that I take a song that I really like, then I listen it “to dead”, until i have no more emotions to it. So, then it is still a good song, but it is not distracting. The last songs I was listening in a loop have beed Ambitions by Donkeyboys, Mystic mountains from the Hobbit-movie, die immer Lacht, or “kein bock by eure Mütter”.

quality

As a good software developer I know of course about the parameter of audio files and the quality of sound is very important. But actually i don’t care about kb/s or 80-40000Hz. I think even 32kb is ok. Having that, voices sound good and feelings get transported well. When programming it is better to use headphones. I like to head deep bass, but I don’t want my heart to get shocked. For that good headphones are important. I think there are many good brands that offer nice headphones. Both is fine, a small button I stick to my ear or bigger once that cover the hear.

settings

I like to feel a deep bass. So I change the settings in my operating system. with very low mids and very high deeps and hights. There it is important not to increase the bass. but to reduce the mids. Because otherwise the quality get very bad. On the image is my current setting for the pulseaudio driver in Ubuntu. In Windows a similar setting is called Bass-Improvement to have system-wide stronger bass. Actually my notebook is not very good. It was cheap, 4 years old running by an i3. but with that setting, even guys with mac-books tell me the sound of my notebook is so good. So the notebook can not be as loud as on default settings. It is still worth it.
equalizer

By the way, I am not good at dancing or singing. I don’t play any instrument. I just listen to music.

My notebook is now 4 years old and when I look to get a new one, it seems if there are no better notebooks today. 4 years ago I was paying 460€ for my acer with an i3 4010u, 4GB, 250GB-SSD, 1080p 15.3” screen. Even after so long time it is very hard to find something better, for the same price AND I am looking to have a note-book of the same size and thickness.. If I want more, I need to play more.

And actually I want more, but when spending a little more, the increase is to little as that I want to do it and it the specs are better, the price easily goes out of range.Since 4 years I live with a broken left mouse button, so the quality of my notebook was even at that time on a low level. So next time I really want to spend more for my PC, so that it is every day a better feeling when working on the machine. And as a software developer I work a lot on this machine. most of my open source projects are developed on my notebook.

Actually I am happy. I am happy that it is not nessasary to get a new device. And I like, that coding usually requires so little hardware. I am happy, that this hardware lasts so long and delivers a good reliability. since about 8-9 months I am switched to linux and in this area the hardware seems to olden much slower.

And I am not just thinking for myself. It is better for the environment.A device less, that I buy, is a device less, that is on a mountain of crap. And as it seems others are also using there devices longer. 10 years ago, you could buy every two years a new machine. But now a 4 year old computer is still good. I like that. Not to forget is the social stability. A so old machine, is still capable to fulfill most important tasks. I think most of it is on the internet, and a internet PC is today very cheap to get.

With that I want to thank Intel and AMD for a slower innovation cycle.

Recently I had to reinitialize my webserver, doing some updates and just clean up all the stuff, with that I broke with testing the previouse installation. For the new system I decided, that it should be hosted with nodejs, not with apache. Doing that step, I also had to move from wordpress to something new. On the server I had already running serveral nodejs services. That help me to watch youtube videos in china or store files right from the web.
setup

Now the main webserver should be replaced. After checking some options, I decided to run the nodeprocess on a port of my choice and redirect port 80 to that new port using iptables. In this way, the nodeprocess don’t need to get started with root-privileges. With my previouse nodejs services I had the problem, that they always shut down over time. The solution for that is as the following listing:

process.on(‘uncaughtException’, (err)=>{
console.log(err); // actually I log into a file
});

This snipped prevent the server from shutdown after an error and later I can check out what happend. So the issue was, that the servers logged to console. The console was filled up. and the process broke. This issue was the same with using forever, pm2 or run the server in background and ‘disown’.
system

The server that is running now is an express server, serving static files from its public directory. First I begun to do prepare some basic layout writing underscore templates, managed by my template manager. But actually I didn’t wanted to build a layout now. That made me looking for static page generators. On github are many pages made using jekyll. But it is a system made with Ruby and I wanted to use something with node.
hexo

After a while, crawling some websites, I found Hexo. A static page generator, that has some CLI program to initialize a new project, import content from my wordpress page, create new pages and posts. The structure with pages and posts has directly been familiar to me. For Hexo, there are about 50 themes on the official website. I chose one and tweaked it to look like a page for a software developer. The theme is already responsive and looks very clean.

I can directly write new posts and pages from the console. The cli initializes for each a new markdown file. Where I can directly write new content. For local, to check out how the page looks the cli-tools provides a build-in webserver, that will live regenerate the page. For production, you use “hexo generate” to create the static html-files. after generating simple copy the files to the public directory of my live host and there is the new content. The system even generates archive pages that let the visitor brows the site by time. on the sidebar is a tag-cloud, that help to explore the web-side with given tags. This will be a great plus for Search Engine Optimization.

For now I am very excited about hexo, it is great to make simple websites and I can have a good separation from the rest of the code, that I will add to the server.