there is no wasted time in getting knowledge and experience.
you had to fall down with bike many times before you learned to drive it without to fall, but again, you can drive and other people can kick you and you will fall.
it is the same with IT, you are part of the team and all people depend each from others.
the longest IT job? stupid but true answer: NSA and similar in other countries. there will be always better and better technologies and more and more spying (with aim to make repression against rebels). therefore work for the state is always the longest, as you asked: Which job has the longest life do you think?
but to work for the state they check your background, your family, etc. therefore they have professionals because they employ thousands of them, but individuals can be total clowns, but they get job because their family has connections in the gov. therefore some kids hack pentagon network.
1) the highest jobs in IT are in fact IT managers who, during the time, get different certificates and get higher positions (chief information officer (CIO
), etc). All tech guys below/under them must kiss them in the last part of the body and work as they say. who is below? number 2, 3, etc. you mus choose what you prefer and what are your capabilities and possibilities (personal and family connections, privileges, etc, it is not the same if your father is george bush or man from communal service).
2) "local managers" who can manage different sections, for example at university which can have 500 computers in 10 buildings all over the city, every department can have their own managers.
3) now come IT guys: network administrator, system administrators (windows, Linux, etc) and help (different people have different problems with computer or they don't know how to login, so, there are guys who are "desktop help" at university). you can include here and coders in companies, not at university that usually buy ready made software.
4) hardware guys who assemble new computers, and also destroy unused computers before they put them in electronic containers. they destroy HDD because of scientific or industrial espionage. so, they have guys for that too. they are hardware guys and as I said, some companies and institutions can have several hundreds computers + servers + other parts of network.
so, as you see, coders are at the same level as network and system admins, they jump and sit as CIO tells them. if CIO in China says you must install software or create software to spy students or workers, they must do it if they want to keep job and get salary.
you can make and your own private company if you are good coder or hacker but again, market is full with companies owned by people who have connections in the government and they make real money, because their software will be installed on 100 000 computers and they profit from that. now you understand one important thing, whatever you create, market is full with similar products and you need a lot of money for marketing, and connections to sell your product, in other case, nobody will use it. therefore many people look for rich people who will finance their project, is it some new anonymous email or some software, you need a lot of money to pay coders, to pay for marketing, etc. it is similar like one website among billion websites, how many people will really know for your site? it is the same with software.
but unfortunately, coders and admins are depending from CIO and from rich people (angel investors behind whom stands CIA) and from government, so, again, answer on your question: work for the state is always the longest, if you don't have moral problems to make money by helping them to make bigger repression. less you know about politics, more you will work for the gov. those who knows politics, they are infiltrated and hunted as anonymous.