[link] Vi Lovers Home Page
Vi Lovers Home Page - terrific resource for everybody. Piles of links - tutorials and FAQs.
Must read.
Vi Lovers Home Page - terrific resource for everybody. Piles of links - tutorials and FAQs.
Must read.
Posted by
Ihar Filipau
at
1:59 PM
0
comments
Labels: link
Learning vi
Pretty good for beginners - just like about any other document I have seen from Gentoo.
Posted by
Ihar Filipau
at
10:59 AM
0
comments
Labels: link
Thinking about team work organization, I was constantly humming "Divide and Conquer" (DaC) principle. That's pretty obvious since it is guiding principle how big teams are taking on large problems - by splitting them into many smaller ones. (Small enough for single person to solve.)
Turning back to work, my eyes have met again with several of my constructs loosely based on MVC model.
Sudden enlightenment: MVC is another application of more general DaC.
How DaC works. A (simple) problem is split into three (primitive) problems:
2 smaller problems of original bigger problem and (one more piece everybody forgets about)
problem of integration the two smaller solutions into solution for bigger problem.
The third part - often forgotten line connecting two blocks - is very important and often play crucial development organization role. Recurrently applying DaC we can slice problems until they reach manageable size.
How MVC works. A problem is split into three problems:
stateful part containing all data/state (model),
stateless part containing all utilities needed to work with model (view) and
controller part which best exemplified by UI to manage the data of model using the utility of view.
MVC generally drawn as three blocks, with model being independent, view depending solely on model and controller depending on both model and view.
Similarities are obvious.
On high level, MVC's controller is the interface connecting the two pieces of problem - model (state) and view (functions). (Bigger problem split into two smaller problems - model and view - with controller playing role of integration problem.)
On lower level, MVC looks like DaC splitting original problem into three smaller problems and plus three more integration problems (view to model, controller to view and to model).
Posted by
Ihar Filipau
at
8:09 AM
0
comments
The page where I found tip for the annoying PuTTY problem, also had great tip:
:help usr_12.txtThere you will find clever tricks you can do with VIM to accomplish simple yet sometimes needed tasks. And overall page has lots of simple hints. Very good reading.
Posted by
Ihar Filipau
at
5:23 AM
2
comments
The problem was annoying me for very long time: under PuTTY, applications (e.g. less, vim) using tek window (alternative terminal screen) had totally screwed keypad. Solution was found here.
Apparently, PuTTY tries to do something smart. And fails.
Workaround:
Posted by
Ihar Filipau
at
5:11 AM
5
comments
Labels: broken terminal
I often asked on how software development works. To most people unfamiliar with all stinky innards of development process, figuring out how to get anything out of developers is very very tricky. Sometimes people see logic behind what I do - but often they are lost when trying to deal with me.
So as an insight into developer's head I would explain shortly here two of my software development principles. "Shortly" and "two" - because I have managed to date to formulate only one (second) of them and first was well know before I was even born.
1. This is grand principle which regulates lion share of decisions made by software developer. LAZINESS. Some think of it as of bad habit, but in as old programmers' proverb goes to find simplest solution to a problem, assign the problem to laziest programmer you have. In development and programming, laziness is source of all simple decisions which are often by outsiders are seen as "original" or even "genius". To programmers - it's just N days of work saved.
1a. Corollary. In development team with no lazy people, one would hardly see any innovation - or properly working program. After all, non-lazy people can make even pigs flying.
2. It just dawned on me recently and I have managed to formulate my second most used programming principle. EGOISM. (I would claim nothing and rather expect that somebody already did research that before me.) The principle is very simple: make something what would be useful to you and most likely others would find it also useful. Check the Unix made of thousands of small and big utilities - most of the utilities were initially developed for particular purpose of its author himself. But later were also found by others to be useful. Well, Unix itself was made for very particular purpose - and none of its developers even thought that Unix would catch up. Yet it did. Why? Because first and foremost it was useful to its creators. They didn't cared much what others did with it - how egoistic of them!? ;)
2a. Corollary. Excessive non-egoistic programming results in piles of abstract interfaces made to abstract other interfaces which abstract other interfaces. They do not do anything in particular - they are written often because people are told to write something. It is hard to make something useful - if you are just a little gear which needs only to mesh with other such gears. And to mesh better - we need more interfaces, abstraction layers and level of indirection. It also happens to be a generic sickness of many successful projects which in beginning "just work", but authors along the way get bored and start adding needless minor features (by request of vocal user minority) which in the end obstruct core functionality. Program was started as something working - thus became popular. Later on to satisfy needs of few others (here ended the egoism!) features added were not needed by authors themselves (nor (as usually!) were properly communicated by end users to developers) thus ended up being implemented poorly.
That's it for today.
Posted by
Ihar Filipau
at
2:23 AM
0
comments
Posted by
Ihar Filipau
at
4:48 AM
0
comments
Something like this should be shipped along with GNU Info documentation system - to make it any useful:
$ cat ~/usr/bin/iinfo
#!/bin/bash
info --subnodes --output=- "$@" 2>/dev/null | less
$
Posted by
Ihar Filipau
at
4:10 AM
0
comments
I can recall only five levels of severities:
MAJOR: Alarm. Critical unrecoverable error. Results in certain termination of application.
MINOR: Recoverable error. Application can go on, but something is fishy.
NOTICE: Not an error, but shouldn't have happened.
INFO: Run-time information statistics, "anomalies" a.k.a. unsolicited messages. Must produce passable amount of information since might be used for monitoring of real system.
TRACE: Used to trace what's happening in the system: functions called and their arguments. Produces insane amount of output.
DEBUG: Debugging info. Developer's corner.
Production systems run on MINOR level, so that all errors are displayed. MAJOR level normally has abort() built in so that OS would dump core of application for further investigations.
Systems in testing run with INFO level. Often the output is saved and required to match in repeated tests. E.g. if we have fed application with 1000 bytes of info, we would expect INFO message to reflect that 1000 bytes where handled. Not 999, not 1001, not 500 + 500.
Edit1: Added "TRACE" level.
Posted by
Ihar Filipau
at
1:32 AM
0
comments
Well, results are not that good as I have hoped. (In depth info at Wikipedia. Read the first reference on the page written by Maurice Herlihy in 1993.)
Posted by
Ihar Filipau
at
10:23 AM
1 comments