clean my code: reloaded!

Written by  on June 21, 2017

As always: some projects need a first (working) implementation and then over time you can improve them.
During lunch I was talking with a colleague about this tool. Then the idea to just use those actually changed files from the current implementation (means: the current branch in Git) shall be used as input. Et voila: consider it done!
Also added some fine-tuning to the call-parameter of the script itself, so it can be run as well with some custom string beside “todoM” (which is my marker).

Cleaning an implementation of properly tagged lines takes now a second – not minutes (like before!
Enjoy and have fun 🙂

Code can be found as always at https://github.com/marcelpetrick/cleanMyCode/blob/master/remove_todoM.sh

windows shell: some sleep-replacement

Written by  on June 20, 2017

Ok, “wait” does not exist and “sleep” as well too.
Then there is the infamous ping-trick:

But the solution is:

collection of hints for the easier use of cygwin

Written by  on June 14, 2017

some better package-manager than via that set-up.exe: apt-cyg!
url: https://github.com/transcode-open/apt-cyg
=================================================
make shell-scripts runnable under Win (7):
add to the first line after “#!/bin/bash

else you get the error message that “\r” is not a command … ha
=================================================
how to use proxy for firewalled use:

Maybe more will be added. All just small, but fixing tricky

shell-script to clean a project

Written by  on June 14, 2017

I like to decorate the code with some debugging-messages, explicit variables, etc. while developing a feature or fixing a bug. Problem is that other team-members will not like that (or the amount ;)).
So, I commit the current state with Git and then remove all lines marked with the comment “// todoM”. Since this some non-creative work, why not automate it?

Code for the bash-script now on github: https://github.com/marcelpetrick/cleanMyCode 🙂

Further improvements like massive parallelization planned!

edith 20170619:
The fourth version relies now on some exported bash-function, so that GNU parallel can be used to speed up the process by parallelizing the search&replace inside the file- (-list given by find).
This helps, just I/O is now the bottleneck. CPU-speed not.
But I’ve always wanted to experiment with “parallel” and see how to use this. I should improve the “contactSheet”-script as well. Or the cat-cam-script .. endless opportunities ..