Tuesday, March 16, 2021

Invalid ELF Header

https://www.freecodecamp.org/news/escaping-lambda-function-hell-using-docker-40b187ec1e48/ Apparently I have to do npm install and serverless deploy in a docker running a linux which is as close as possible to the machine running in AWS.

Tuesday, November 24, 2020

Interesting day - what to do if docker registry fails with timeout.

So today was interestingly frustating...

I've setup my Mac in order to use brew for mostly everything because I like installing stuff from terminal. ( Definetly this is a personal issue from the days I had to install and reinstall my Windows machine ).

Now I did my development setup to support a backend oriented programmer because that's what I do in my professional life. With this in mind I wanted to dive into writing a lambda in node because I will use that know how for work.

So after a few "brew installs" which went ahead without a hitch I started :

- sam init

- sam build

- sam local invoke ScheduledEventLogger --event events/event-cloudwatch-event.json

Yes, I used the setup sam can create for you - I did say I was testing stuff out.

And then this happened : "docker: Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:50524->10.0.2.3:53: i/o timeout."

Of course at this stage I popped up google search and start reading stackoverflow... So I tried a bunch of the things that were suggested - not a happy result in sight was to be seen. So then I've given up and said to myself that I need to get on the "tried and true" solution: uninstall and reinstall - but happiness was not in sight. And then I got onto : https://forums.docker.com/t/pulling-docker-images-i-o-timeout/740/6

So turned off and on my Wifi and "voila"

Friday, August 21, 2020

Still here - still coding

There is a question which HR loves to ask when interviewing a candidate : " Where do you see yourself in 5 years?" My answer: " I want to do this stuff even at 80... so the best things are in between" Not always loving HR but seeing the faces when they hear the answer makes me giggle. Also staying sane enough to be doing this job is a job of its own. Not losing your mind when every year there is a manager that wants a fully featured task in 2 weeks even if the whole team estimated it at 2 months, is again a job of its own. Not to mention the rate at which new stuff appears that may or may not be good in the long run - but one still has to learn it 'cause you never know.

Tuesday, April 7, 2015

Stuff from rails trenches

Routes resources and resource are 2 different things.

POST to a url with basic authentication and 301 response without follow through.

require 'rest-client' $result = '' RestClient.post('https://username:password@localhost:3000/', {} ) do |response, request, result| $result = result["Location"] end puts $result It took some digging but it's nice and short. Happy thoughts.

Friday, September 17, 2010

I was at: Unit Testing Training


I've been trying to improve my skills in direction of software craftsmanship.

First thing's first : the difference between mocks and stubs is now clear.
When do i use stubs and with what intent - talking about code review ( unit tests are code as important as production code towards the value added paradigm).

When do I use mocks and most important at what stage of the development process could one insist on using mocks.

Ideas are a great thing so now I can say that reading about this subject and doing this training gives a much clear picture how to do it (crafts). It's still fuzzy but I'm confident i'm getting there one step at a time.


Monday, July 26, 2010

Insight of the day

Insight of the day

Prologue:
My New Year's resolution in july : no more feature releases without unit tests.

So , I was doing an Active Record kind of entity on a project at work and with my resolution in place I'm hard at work. The funny thing is that I'm learning the Mockit framework.

The first thing I'm realizing : hey I'm learning the api by hard - and the corporate world says there's no value added with unit testing.

I'm not really really sure you need to mock the exact api but hey at least I'm following what I believe in.

Do you do that ?
DO YOUR UNIT TESTS!!!!!!!!
PS:
If I can make hudson build the unit tests and someone else in my team will fail the build my boss is going to buy me a beer.
Double added bonus.