Wednesday, 27 September 2017

The curse of education industry

The curse of education industry

This is not the first time I get hit by the (quite common) stereotypes about the Education industry. And I can't say I was not warned - quite the opposite, just before I got the job at the Uni I was told that it does not count towards commercial experience. But at that time I was quite sick of the corporate environment - a lot of rudeness, shallow jokes, tasteless parties, etc. I was hoping to find a better medium at the academic circles (and better pay, of course). At first it actually was so.

Now, having spent over 15 years at the Uni, I am sick of bureaucracy and fake smiles, budget cuts and wasteful spending. It's time to get the new job and I have prepared the CVs and cover letters, and am ready to dive in to the sea of unknown.

I tried this (not very thoroughly) earlier last year. I did not succeed despite receiving invitations for an interview on both occasions I applied. This year I was hoping for the similar result. Surprise: nothing, not even a click on my blog I started for this occasion. Looks like the myths about educational industry still prevail the minds of my potential employees.

Myth 1 - deadlines are not met and standards are low at Uni

Funny enough, there are thousands of students come through the University each year, and every time in the beginning of semester it's a mad house: last minute orders to install software on dozens of computers. Last minute rearrangement of lab layout. Unprovoked network port block by the central ITS. And so on. Guess who should fix all of the above before the first lab? So I do. And I succeed. It's true that many times the decisions are made quite late and there is physically not enough time to implement most of them. But it is also true that the students come next day to the fully functional computers and equipment. So the myth is not quite right about the people who actually do the work.

Myth 2 - Uni people are not skilled enough and their products are of low quality

Imagine an Uni tech, working on huge variety of subjects, from AV integration to CNC programming. The tasks change daily, there are always a new skill to learn - not to the perfection, but enough to make things running. In complex systems - and University is one of those - it is much more important to maintain the stable operational flow than to fine tune individual processes. At some stage after dealing enough with certain issue the skill level gets relatively high and the quality improves accordingly. So it is quite untrue that University means low quality experience. Rather it means broad skill set and ability to learn on the fly.

Myth 3 - Uni people tend to do everything perfect and thus it takes forever to do anything

The opposite to the previous point (and sometimes mindlessly quoted one after another) also does not bear the truth. While every one should thrive for perfection, in real world common sense rules that "good plan today is better then the perfect one tomorrow". Considering how many times I had to streamline some jobs due to late notice/urgent requests, the question of slowness is rather theoretical and based on stereotypes.

Thursday, 21 September 2017

Climbing up the corporate ladder

Climbing up the corporate ladder - does it worth the effort?

Abstract

I am going to highlight some features related to the career growth and promotion. Some things are obvious and need no explanation. Other are quite subtle and not many people either notice or speak openly about those. This post is short and is only intended to warn others of the possible pitfalls while they are at the beginning of their career.

Small to medium organization

Basically there are two types of small organizations: where it is possible to grow and where it is not. Some very small firms are so fixated on their survival so there is not much room left to expand and progress. But once the company starts to make some profit due to the nature of capitalism it will want to grow.

Starting at the very bottom it is possible to climb up a few rungs. Usually this is achieved by adhering to higher then normal workload and active involvement in company's projects. If your contribution has benefited the company and your efforts were noticed by the right people you have a very good chance for promotion. Your growth at this stage is related to the business growth.

Each stage will require different skills. As you improve your current talents and acquire new skills you have most of the opportunity to get a little bit higher. Eventually if you reached the desired position in the company but you want to move higher, you will start gazing at the larger pool of opportunities.

Large or government organization

In the large organization it is still possible to get a promotion, but it gets much harder towards equivalent of middle management. At some stage the organization is no longer operating in a predictable manner. What seemed logical at a very low level or at a small business described above does not work well (or not at all) at the big firm.

Hard work and personal initiative now are not the most important characteristics the management will look for in the potential candidate for promotion. Here comes something out of middle ages: loyalty and obedience. If you do everything your manager tells you, even if it seems stupid and absurd, you will get their appreciation. If you try to do something on your own, this is a signal that you are either too smart (and therefore too stupid), or too dangerous. In the best case scenario you will get ignored (even without formal thank you). In the worst case you will get ignored profusely to the point of pushing you out of the job.

To understand the psychology behind such behavior you need to understand how the higher ups got to their positions. When there are several candidates for the same role and there are no distinct professional criteria specified for that role, the one with better connections will win. Simple as that. At the top it does not matter anymore what you can do and what do you know. But who do you know and who knows you becomes very important.

But this is not a complete picture yet. The people at the top are also competing with each other. And if your boss is not successful at getting his own promotion, most likely you will not get yours. At that level the stakes are so high the people start to employ more and more ruthless methods of removing their rivals from the race. You can guess what kind of people most likely to get to the top.

Is it worth to struggle to get to the top? I guess everyone will decide on what kind of top is most suitable for them. My top (and full stop) starts where my dignity and self respect get ignored. This is the moment I start looking for another job.

Sunday, 17 September 2017

Power control - Hardware

Power control - Hardware

System overview

The power control unit consists of 6 relays connected to an ATMega8 MCU. The main (lower) board is self sufficient and contains all necessary parts for proper function.

The top board serves as an easy indicator of the relay state. It plugs to the header pins on the bottom PCB.

Power control in action

The system can be connected to any AC circuit (limited by relay characteristics - usually up to 10A/400V AC). In the picture below the system is connected to the modified power board, serving individual 4 outlets (out of possible 6). The power control gets signal from computer or similar control device via RJ45 cable.

With the top board connected to the main unit it is possible to see which relays are operational at any moment. Red LED means that relay is conducting and green LED means that relay is not conducting (Unsafe/Safe).

Power Control - Code

Power control - Code

Syntax highlight generated with tohtml.com

Relay1.c file

#include <avr/io.h>
#include <util/delay.h>
// Clock Speed
#define F_CPU 8000000
#define BAUD 9600
#define MYUBRR F_CPU/16/BAUD-1
#define CMDERR 0x02
volatile unsigned char c;
volatile unsigned char i;

void blink(unsigned char led){
        if (led) PORTB |= 0x02;
        else PORTB &= ~0x02;  
}

void USART_Init( unsigned int ubrr)
{
        /*Set baud rate */
        UCSRA |= (1<<2); //set U2X bit
        UBRRH = ( unsigned char)(ubrr>>8);
        UBRRL = ( unsigned char)ubrr;
        /*Enable receiver and transmitter */
        UCSRB = (1<<RXEN)|(1<<TXEN);
        /* Set frame format: 8data, 2stop bit */
        UCSRC = (1<<URSEL)|(1<<USBS)|(3<<UCSZ0);
}
void USART_Transmit(  unsigned char data )
{
        /* Wait for empty transmit buffer */
        while ( !( UCSRA & (1<<UDRE)));
        /* Put data into buffer, sends the data */
        UDR = data;
}

void send_string(unsigned char * s){
        unsigned int i=0;
        while(s[i]!='\0'){
                USART_Transmit(s[i]);
                i++;
        }
        USART_Transmit('\n');
        _delay_ms(100);
}
void send_number(unsigned char n, unsigned char radix){
        char s[8];
        itoa(n,s,radix);
        send_string(s);
}

unsigned char USART_Receive( void ){
        /* Wait for data to be received */
        while ( !(UCSRA & (1<<RXC)) )
                ;
        /* Get and return received data from buffer */
        return  UDR;
}


void main(void )
{
        DDRD |= ((1<<DDD2)|(1<<DDD3)|(1<<DDD4)|(1<<DDD5)|(1<<DDD6)|(1<<DDD7));
        USART_Init(MYUBRR);
        send_string("\n\nReady...");
        i=32;
        char dir=1;
        short n=0;
        short relay=0;
        unsigned char b1;
        unsigned char b2;
        short data;
        short data2;
        char buffer[20];
        char message[20];
        while(1){
                c=0;
                while(c != '\n' && c != '\r' && n<20){
                        c=USART_Receive();
                        buffer[n]=c;
                        n++;
                }

                buffer[n]='\0';
                send_string("received:");
                send_string(buffer);
                for(i=0;i<n;i++){
                        if(buffer[i] == 'R' || buffer[i] == 'r'){
                                relay = buffer[i+1] - '0';
                                relay += 1;     //adjust for unused tx/rx port d
                                if (buffer[i] == 'r'){
                                        PORTD |= 1<<relay;
                                        sprintf(message,"portd %d on",relay);
                                        send_string(message);
                                        send_string("relay off");
                                }else{
                                        PORTD &= ~(1<<relay);
                                        sprintf(message,"portd %d off",relay);
                                        send_string(message);
                                        send_string("relay on");
                                }
                        }
                }
                n=0;
        }

}

Makefile

# sample makefile for programming AVR microcontrollers
# be sure to fill up the blank entries before you run this!

# the C source file, without extension
SOURCE = relay1

# device name
MCU = atmega8

# CPU speed, needed by <util/delay.h>
F_CPU = 8000000

# tools
CC = avr-gcc
SIZE = avr-size
OBJ = avr-objcopy
OBJD = avr-objdump
AVRDUDE = avrdude
RM = rm -f

# avr-gcc options
CC_OPT = s
CC_WARN = all
CC_LST = -Wa,-adhlns

# avrdude options
AVRDUDE_WRITE_FLASH = -U flash:w:$(SOURCE).hex
AVRDUDE_PROGRAMER = usbasp
AVRDUDE_PORT = 

# some strings for the UI
STR_BEGIN = Starting Build...
STR_CLEAN = Starting Clean...
STR_PROGRAM = Downloading Code...
STR_END = Done.

# general targets
build:
        $(CC) -mmcu=$(MCU) -W$(CC_WARN) -DF_CPU=$(F_CPU) -O$(CC_OPT) $(CC_LST)=$(SOURCE).lst $(SOURCE).c -o $(SOURCE).elf
        $(OBJD) -S $(SOURCE).elf > $(SOURCE).lss
        $(OBJ) -O ihex $(SOURCE).elf $(SOURCE).hex
size:
        $(SIZE) --mcu=$(MCU) --format=avr $(SOURCE).elf
clean_files:
        $(RM) $(SOURCE).elf
        $(RM) $(SOURCE).lst
        $(RM) $(SOURCE).lss
        $(RM) $(SOURCE).hex
download:
#       $(AVRDUDE) -c $(AVRDUDE_PROGRAMER) -p $(MCU) -P $(AVRDUDE_PORT) $(AVRDUDE_WRITE_FLASH) 
        $(AVRDUDE) -c $(AVRDUDE_PROGRAMER) -p $(MCU) -B 20 $(AVRDUDE_WRITE_FLASH) 

begin_all:
        @echo $(STR_BEGIN)
begin_clean:
        @echo $(STR_CLEAN)
begin_program:
        @echo $(STR_PROGRAM)
end:
        @echo $(STR_END)

# WINAVR targets
all: begin_all build size begin_program download end
clean: begin_clean clean_files end
program: begin_program download end

Thursday, 14 September 2017

How to make your computer run faster

Slow computer has happened at least once in your lifetime. If you use Windows - may be much more than once. What you would usually do? Cleanup, uninstall unneeded programs, remove old data, defragment and finally full reinstall. So what new I can tell you here?

First thing first. The blog title is designed to be liked by search engines. It does not mean I will not tell you anything useful. It just means that I lured you here so you could click on my blog and maybe you will find an answer to your question. (BTW, the exact answer 'Can I make my computer run faster' is 'it depends', but not necessarily on things you usually hear from IT professionals.

I hope you are still interested. If so, let's begin.

On destiny and chaos

There is a popular belief that all computers of same kind (CPU, RAM, motherboard, etc) are created equal. But the experience shows that two identical computers, freshly imaged and plugged in, can display different performance from the very start of their useful lives. You can change cables, change peripherals, swap places - still one computer will give you trouble. Like a bad omen is hanging over it. Sometimes full reinstall helps. But often you just cannot fix it. Finding the root cause will waste your time and money, and there is no guaranty you will actually discover it at all. Sometimes this is a very hard to detect RAM malfunction or faulty PSU, or dodgy BIOS. To check all nodes of a complex system is just not worth it. The multitude of possible scenarios reduces your chance of success down to zero. And in that case there is no other option but to get a new computer. Right?

Not all operating systems are created equal

When I just started my job as IT support technician I had to make a network cable, because there was no available ones in stock. It was during the time when 100 base T was the top speed and Windows NT 4 was the most popular system at the enterprise level. Being completely ignorant of wiring standards I crimped the cable and connected it to the computer running Windows NT. To my amusement it started to complain about 'no carrier' being detected. Strange, I thought, my tester did not show any miswiring. I started Linux from a live CD on the same computer and the cable got detected, although only at 10 base T. This led to the series of discoveries. First of all, network cable is not just a bunch of wires, but also each pair of wires has it's own electrical properties which affect the way the signal propagates. Thus the network interface card can distinguish between correct and incorrect wiring by sensing the resistance of each pair. The second thing I noticed that different operating systems interpret the wiring properties in a different manner. Linux was more flexible and forgiving to my poor wiring skills.

Should you buy a new computer?

If defragmentation, re-installation and memory tests did not fix the problem, what else left to be done? If you are on a tight budget and it is hard to get a new computer, then you might want to either live with it (suffering from slow and unreliable service) or try installing a different OS.

The real question is: do you want to drastically change your computer experience? Because you will get other problems. But maybe you can tolerate those better then unproductive and erratic current system.

Keywords, content and references

Keywords, content and references

To get my blog noticed I will need a set of keywords that appear throughout my posts more or less consistently. But his is not the main driving force behind blog's visibility. I need references from multiple sources. Of course I could create many fake accounts on blogger or any other internet resource. But that is not very interesting. How about exciting content and useful information? but that takes time. Besides the exciting content will run out very quickly and the readers will be left with rather sour aftertaste.

Recalling a good book or movie, I have to admit that the author usually cleverly manipulates the reader into wanting to read (or watch) more by supplying the excitement (usually in the form of suspense) in chunks, followed by more mellow parts to give the reader the rest. Why can't I do the same? Why should not I tell the story and buildup the reader's interest gradually until I am ready for another story to tell? This will definitely provide the content that hopefully will keep the readers at least curious about what will follow next.

And the references? Let's start with the story first. I will shamelessly put a lot of keywords and links to other sites to promote the story with the search engine. And hopefully the story will bring in the readers. More and more of them.

So let's begin...

Ad free blog - is it possible?

Ad free blog - is it possible?

To blog or not to blog?

Why people share their thoughts with (potentially) millions of others who they have never seen before? Various reasons for different people. Why do I do it? I still don't know. I don't value my opinion that much so to engrave it into eternity. I can even change my opinion. Who cares? Sometimes it is necessary to put my thoughts to the paper (or web space) in order to understand what I am actually trying to say. For me this is the way to crystallize my inner chaos into something that I will peruse later on more orderly manner.

But why blogging? Can't I just write it down and hide it in the desk drawer? Here comes the second reason: this might help me in some other way. How about helping me to find a better job? Exposure to the potential employers can never be too little. So this becomes my personal ad. And this also leads to the second question (actually the first if you count the main title)

Personal ad filled with other ads is just going to get watered down a lot. I can't blog without ads, unless I pay for web hosting or purchase my own dedicated server. Mathematically speaking I need to negate the effect of ads. Could that be a counter-ad (e.g. rant about poor service or product I had experience with)? Or should I overwhelm the potential readers with self gratitude of enormous proportions? There should be smarter way around this

I can't fight Google or any other Internet advertising giant. So why not to use their service to fuel my own ad campaign? Since they use keywords to adjust their advertising to my preferences, can I generate such keywords that will work somehow for me?

It is not possible to create an ad free blog (not a free blog anyway), but I think it is possible to use the ads to my advantage. What is so good about a system? - it is possible to use the ystem to beat the system. Let's see what will come out of it.

Is low level programming still relevant these days?

The levels of abstraction have made the application programming much easier and faster. But everything comes at a price. This is a new ...