Global Warming – Investment Banking the issue

So when i was travelling to work this morning i couldn’t not read this article, i have several things to say about this article in particular.

I personally find when articles like this come about its kind of overwhelming in how under-prepared our society is for the future but so it may seem.  I find it so depressing and disgusting that we simply believe we are all so un-prepared for the future when you consider how much man kind has already endured. And now all of a sudden people are worried were all going have to live off insects to survive.

The article basically hits on 2 main stress points:

  • Food shortages
  • Energy supply shortages

I am going to show you several things that might open your eyes and also discuss my experience from growing up in Northern Ireland and how the complacency of man has created these problems out of nothing.

TL;DR: i believe we are going to be ok, tackling food waste and regulating investment banking will stop making the already rich even more so and the normal farmer to be more fairly paid giving rise to more money into research and development into farming and also education in food waste and nutrition and food heritage. I also believe the energy problem is already worked out but there is no financial gains for the already wealthy until its needed. We will be ok and we will be prosperous as a race.

Food Shortages and Crop Yields

When you consider this most news people and scientist at this high high level really don’t even know the simplest of details, for instance i live on a farm and i see the effects of complacency stronger than you would dare to believe.

For instance the fields behind where i live are owned by our landlord, its a vast vast amount of land with which he even has more on the west of northern Ireland. All for growing crops wheat is a big issue at the moment, my girlfriend’s father was al most put out of business because of this.

Northern Ireland has been dealing with huge rainfall for the last year or so. This means dairy and meat farmers are forced to bring cattle in doors what does this mean. Usually in good weather you can leave your cattle out and feed on the grass on the fields and you rotate them around so they always have grass to feed on. So this is great the farmer has no need to buy artificial feeds made from wheat etc.

With the large down pours the demand for wheat has increased but the supply has been lower than previous years not drastically lower but lower more and more smaller farmers have been forced to buy from abroad etc. The demand has increased because in the rain farmers are forced to bring the animals inside into shelters and feed them a mixture of wheat feeds, straw and cut grass. But why cant you just leave them out in the rain the whole time. This is because if you leave cattle out in the fields you fields will be utterly RUINED and you will NOT be able to grow grass usable to feed your animals for probably best part of a year. So your will be forced to buy food and you cannot grow at least some grass.

So this is 1 aspect the effect it has on dairy farmers so ok this sounds bad with the more rain they cant feed animals of their own back with such low pay for milk which by the way is insane milk is cheaper than water which makes no sense at all.

So the people growing the wheat remember i said i live on a farm, with all the rain the fields are entirely water logged and haven’t produced anything in the last 4 months and are trying to be fixed. And i even had a chat with green grocers in my town and how most of the veg we all eat here is from Spain and Holland. Now i have mostly conjectures no hard truth to say there are many effects to consider to understand here.

  • Adequate drainage was never implemented for these fields ever
  • Poor poor maintenance of the fields
  • Poor maintenance of equipment
  • Not enough workers and low pay

So you can see there are quite a few reasons here for this situation the fields are in. This has so many effects and problems to be considered to fully appreciate the problem lets think first low pay which is the easiest for most skilled workers in the western society to understand.

Supply and Demand of Raw Produce

So when i see our fields behind out house when we first moved in there were several wheat fields they were brimming with produce and busy happy workers. But when it even vaguely came closer to winter everything shuts down. And there were equipment problems for them and not enough money available to warrant the amount of effort required to make a living. Never mind the completely un-prepared fields with no drainage etc which was complacent on the farmer. So when i had that conversation with the green grocers all they had to say on the matter is “you’ll never beat the dutch in growing”. So why is this statement true why cant we in nothern Ireland grow as well as the dutch is it to do with our climates probably something to do with it and the fact they do grow marijuana there which has had an awful lot of research and development into that probably can have an effect on normal growing by a far greater understanding. But why isn’t there more research into bio domes and more available funding for bio domes and micro climates etc for vegetable growing and farming a much more vibrant industry for a newer younger generation to be involved in.

I wouldn’t say the work is any more difficult, for me as a software engineer sometimes helping on my partners families farm is the first peace of mind i feel in a long time. The stress and anxiety of a corporate world is overwhelming sometimes. But this can then lead into the next issue BANKS and large Super Markets.

Banks and Investment Banking

I am not going to pretend i don’t go to Tesco or Sainsburies’, but do you ever look onto BBC news and see oh Tesco’s operating profits have dropped and Tesco credit cards and Tesco banks and Marks and Spencer bank accounts and ISA’s etc.

Well that the hell is this, since when where i buy my potatoes and sausages all of a sudden turn into a bank where i can get a loan and get my wages paid into. Well this is where it gets complicated and intentionally so which you might find. When you see these articles on these super markets dropping in profits or growing in profits; its never that more customers decided “i don’t link Tesco” all of a sudden and go elsewhere, generally the same customers are going to these shops.

But what’s happened that they are loosing or gaining money, when you spent money in these super markets they are using the profits to start putting it into investments abroad housing mortgage’s, stock exchanges, stocks on commodities or shares in companies. And gambling their profits to gain money.

For example the Co-Op bank has been on bbc news a lot recently but co-op is simply a small shop round the corner. Since when did it become a bank (doesn’t matter). What’s happening these smalls shops started out doing fairly well but over time they ended up using profits over time investing into anything and everything and if they put money into apple shares in 2002 then 2004 sure fuck me they are probably loaded. But this is why investment banking is so insane its just a gamble with money. The 2008 financial crisis similar but more complicated issue we as tax payers pay for their gambling debt and i say gambling debt because it is.

But wait how does this related to the issue of wheat supply though-out the world. Well when the wheat prices effect the dairy farmers which is a good example creameries are under so much pressure of super markets such as Tesco to drive price DOWN DOWN DOWN. So the effect hits on the dairy farmer so he is taking the hit here and believe you me this is a big hit small milk farming of around 100 cows is almost dead because of this. Even though this actually produces a fair amount of raw produces you can trade.

And what’s worse is this is almost un talked about and unheard of. To most people they might think 100 cows is a lot and it is. For example the Artificial insemination cost of breeding cattle, and different breeds different yields and effects of milk. Then health cost of cattle these days is going up and up veterinary bills and so on.

I mean me and my partner were with her father and we had to bring tepid water to a cow who was bleeding from the inside out after a bad calving where the calf at least lived, but the cow died even though we had the vet out and the they took blood from another cow to help and sown her up and everything. Me and my partner went back to work the next day and that night we were told the cow died. It was so sad i remember that day so well i remember where i was sitting and what we were doing.

I mean its one cow and the farmer bared the cost, but 1 cow gives so much to society. Even farmers these days by law have to pay the government to dispose of the animal when it dies and the farmer bears this cost also.

Beef and milk are the raw produce from a single cow. We can make yoghurt, cheese, milk, cream, butter milk, steak… so much. The costs in doing this are becoming so great for smaller farmers that small local producers are almost died out because of the big competition of big farms. So ok there are huge farms here and in England but are you going to bet you whole food supply on 1 guy to do so?

And the other issue is supermarkets are hiding the cost of the issues, when they drive down prices to creameries, creameries are forced to talk it because of such high competition of super market pressure they have to accept the best they can find.

The farmer is the most important man in the world and no one notices. I only choose the dairy and wheat farmer as examples because i have first hand experience with this. So when you think of massive monopolies on food such as Microsoft had on software for years this isn’t good for society and each person around us. Competition although difficult but choice is just so important because of our buy/sell and trading style economics it keeps vendors in check to be fair to the end customers because the buyer or consumer has a choice.

You can argue these super markets aren’t doing anything wrong by branching into investment banking but its created this gambling society throwing money out of our country if it fails and giving vast wealth to the lazy and already wealthy when it goes well.

People creating the commodities are completely forgotten about.

The other side of the coin is this type of investment banking into stock exchanges funding companies and tech companies has brought about so much research and development and vastly changed how we think and communicate with technology but its time investment banking gets tougher and tougher regulation. I don’t believe super markets should be allowed to do any kind of investment banking because your playing with local rural economies which are already weak because of a lower population and investment and consolidating wealth and prosperity into single cities such as London in the United Kingdoms case. I mean the same job here in Northern Ireland will offer me around £30k a year but in London they will offer in excess of £60-70k a year and the end result in often cases will be worse in London than the lower paid guy from here.

The consolidation of money is the weakness to our economy and high liquidity keeps everything in check and to have high liquidity you need more competition of smaller vendors and avoiding huge monopolies on anything. For example if someone person owned all the oil in the world and all the food in the world. What would the world look like? And if there are lots of people who own a little bit so we can trade fairly what would the world look like?

Then what about tacking food shortages, i really don’t believe in any way were all going to have to start eating insects even though something like 50% of the world does eat insects as part of a healthy diet. Whats happening is that no one has any life skills any-more in my experience, its only the last 2 years the cut of meat Brisket is becoming known in the United Kingdom the amount of food waste there must have been for such a long time. And un-fashionable vegetables such as a simple Turnip which can grow easily here any root vegetable even, there are even crops that like harsher weather the means for us to survive magically already exist but are forgotten about.

For food security the United Kingdom must respect its old food heritage of Nose to Tail eating and old traditional Game meats and offals its only recently i really started to take the notion of eating liver seriously and calves liver is very good even ox-heart is not organ’y at all its meant to be like a steak and when cut and prepared properly meant to be beautiful but i cant just go to down the street and get this. Fish and shell fish ,we live on an island and there is 1 part time fish mongers in Belfast Wednesday to Friday and on Friday and Saturday in the market.

So tackle the issue of Food waste then tell me were all going to have to eat insects and i might believe you, there is simply just so much we are over looking in food waste and exporting and not eating i refuse to believe that statement. I am not saying the issue is a simple one but education on food and food preparation should be mandatory in school. Not only this but the notion of food waste must be discussed and nutrition. For me i work full time i leave my house at 8am, and i am not home until 6pm going to my local green grocer and butchers is almost impossible.

Except if i come home early and work from home more. And i think the working life needs an adjustment the corporate world rewards compliance and mundane process over end results which simply makes no sense in a changing world the attitudes to the world need to change to have much more freedom as a human being.

its even getting to the stage in the United Kingdom that having a family a traditional nuclear family i think they call it is almost impossible now the pressures of money, housing, living costs are pushing people to live alone the cost of having a family too great. For me i think its going to be possible to find a job where i work from home full time so at least my partner might be able to resume some what of a career so she can live her life the way she wants and i will support her every way. Just the way she has supported me so strongly with my frustrations of working where i am.

When you then think about the energy supplies, you immediately think of fossil fuels, coal oil and gas and how we’ve been told for the last 30 years that its going to run out no one knows what were going to do and its all going to go to hell.

I really hate this statement you see it made all the time on the news and in school and its just scaring people. All you need to do is watch this video and you will feel security that the world isn’t going to be over in a long time.

I believe the human race will adapt like it always has and it will work and we will survive and we will be prosperous and happy. When articles like this come about people forget where we all came from and how we’ve dealt with stuff in the past.

Thanks for reading and: BE EXCELLENT TO EACH OTHER!

Software Development Process is BULL SHIT

So today i was listening to a lecture on lean mean software development process and my got what the fuck has happened people. I mean fuck, seriously! The reason its intriguing is so many software places people are maintaining really horrible old old code and maybe 1 or 2 people know what they are doing with it.

So this is some sort of formal process of lets write our own code and let the people who know what they are donig do it. Even if you have a bad manager and bad process this happens anyways. I mean seriously anyone who puts this ahead of any other than purely writing software and getting stuff done is retarded these managerial processes are so full of crap.

Look at open source or free software how much its taken off for everything. Is there this crap attached to every project NO. Its NOT NEEDED. Fuck i mean the amount of bull shitters in this world who come up with this crap.


Interesting bug

So i am just spending some time developing gcc-rust in a virtual-machine at work. And bang some kind of bug in my code i am running my code in gdb and bang the whole virtual machine freezes and dies no kernal panic just the whole virtual machine ICE’s. Not sure what to do but try and debug my code on a real machine :S never seen anything like it before cant wait to see what the bug is.

GCC Optimizations on Front-ends

If you ever wonder what magical optimizations can do to your code from GCC take this C example:

#define SOME_VAR 5

int add (int x, int y)
    return x + y;

int main (int argc, char **argv)
    int retval = 0;
    if (add (1, 2) < SOME_VAR)
        retval = 1;    
    return retval;

Its faily contrived and random but if you generate the exact GENERIC tree’s into GCC’s middle end as this C code GCC with -O2 will optimize this to:

;; Function add (add, funcdef_no=0, decl_uid=1787, symbol_order=0)

add (int x, int y)
  int _3;

  <bb 2>:
  _3 = x_1(D) + y_2(D);
  return _3;


;; Function main (main, funcdef_no=1, decl_uid=1791, symbol_order=1) (executed once)

main (int argc, char * * argv)
  <bb 2>:
  # DEBUG retval => 0
  # DEBUG x => 1
  # DEBUG y => 2
  # DEBUG retval => 1
  # DEBUG retval => 1
  return 1;


You can get this output with CFLAGS += -fdump-tree-optimized

Its pretty interesting and under utilized the fact that users can tap into this power so much infact its very very much possible to reuse GCC to implement an open source Coverity product as GCC has been doing everything Coverity does for years but its just hidden to a certain extend as this gets done implicitly and doesnt warn users.

Whats interesting is i have re worte the parser for GCC rust and for example this useless test case i was working on:

fn test () -> int {

pub fn main () {
    let x = test ();
    let y = x + 1;
    let z = ~y;
    let a = &z;

This gets optimized to (although my heap and borrow typing is broken at the moment):

;; Function test (__rust_test, funcdef_no=2, decl_uid=29, symbol_order=0)

test ()
  <bb 2>:
  return 1;


;; Function main (__rust_main, funcdef_no=3, decl_uid=31, symbol_order=1)

main ()
  <bb 2>:
  test (); [tail call]


So it even shows GCC will tail call optimized this piece of rust code and as a front-end developer i don’t have to do anything special to achieve this. GCC has so much hidden potential and it really deserves a language such as a rust to show it off.

I know this a faily contrived examples of things but wanted to blog about it while i was hacking on this test case to fix my borrowing of pointers lol.

Writing lexers and parsers for compilers

A while back i read a post from someone i can’t find the link and it was about how he doesnt use flex and bison for parsing in compilers any longer and at the time i didn’t really agree with him but this week i totally agree with him. Writing parser for rust has been a nightmare using bison.

However i do and always still will use FLEX for lexical analysis because it makes things so much easier and flex is a great tool for so much. Writing lexers are very tedious and annoying and takes alot of pain out of debugging parsers because you know there are no flex bugs. But just writing a recursive decent parser ends up being fairly simple for rust at least until macros come along and templates.

But this was the problem with bison representing grammar for macros and templates ends up getting really messy and lots of bugs. You can follow gcc-rust at httsp:// i also have wrote a fairly big patch to binutils allowing it to be compiled as a shared library so you can embed an assembler into something. Thus eventually after more work to allow gcc-jit to assemble in memory instead of calling gas directly on the shell.

GCC Coverity Travis’y

So my life revolves around the fact, i love writing software. I almost exclusively enjoy working on Tool-chain work and system level problems. The more and more I’ve been developing software I’ve found that i really really care about code quality.

When software reaches a certain age and passes between development teams and there are business requirements to get things done which is fine i understand this. But when the code has to just get things done attitude more and more bugs creep in and quality and readability of the code becomes a serious nightmare.

One thing that can help keep developers aware is code coverage so you are able to remove dead code safely, and code analysis. With this in mind I’ve found that Travis to be almost a waste of money from my experience with it, its _slow_ interface _confusing_ and hard to really get the most out of it.

I seriously believe there is a strong possibility with reusing python-gcc-plugin so at the GCC Tree level we can provide code analysis that should run against all GCC languages C/C++ Fortran Ada GO etc. A first pass code even simply aggregate the warnings an error and provide some nicely formatted statistics. Then you could then start to do some serious analysis.

I’ve seriously got to stop bombarding my self with projects i’d love to do but actually finish lol ;). Anyways some feedback would be good i think its a fairly small self contained nice project there.

GCC Front-end Documentation

This is something GCC has been lacking for quite some time, back in 2010 Andi Hellmund did a lot of work if not most of it to write documentation suitable for the Internals Manual.

It was fairly pain staking, one issue at the time was the GCC code base from about 2009 maybe even before i looked at it until very recently front-end and middle-end API’s were changing almost daily and made things very hard to keep up especially from a documentation perspective.

Recently i only feel after about 4 years front-end development i can say i know how to write and structure the documentation. I have started 2 things that I’ve always wanted to achieve along side my code projects.

I have _alot_ of compiler experience for my age, and i am so passionate about compilers and i believe there are maybe 2 or 3 decent texts on the subject. I want to develop and passionately write a book on compiler development from scratch, with GCC and with LLVM in 1 book.

This has already been started. The GCC front-end stuff i plan on making into the internal manuals. The reason the current documentation isn’t in there is because its very hard to get people to review your documentation in gcc-patches. But its something that needs to be addressed.

In my Compiler book i am going to develop a toy language in C outputting x86 code. Later the code goes into implementing a basic C compiler and how you can structure optimizers and data-flow analysis algorithms. From then i want to show how these techniques apply to compiling different languages and using Flex and Bison vs your own written parsers. The book will also serve as a learning aid in teaching x86 assembler and arm assembler.

There is literally next to no texts on learning assembler these days. Then we develop using GCC and LLVM. Going over what language ABI’s really are, exceptions implementation and generics like C++ templates.

There is so much content, I may even touch on how you can implement your own virtual machine for your language, running on the JVM and also your own VM.

I want it to be the practical current text on implementing a language. Showing you how to go about each and letting you make the decision on what you want.

Language and Compiler development was probably fair to say dead’ish through the late 90′s and most of 2000-2010. With GO and Rust popping along i am starting to believe that the mantle of Java will be at steak and modern language are going to change making compiler development an extremely relevant subject again be it for business etc. Consider Oracle who on the Java trademark i guess they are minted from it. There really is money to be made where if you designed a language and people _like_ it.