Quickly Debug Your #aws #lambda Functions
Great writers use metaphors to get their point across so let me give that a try real quick. Bugs are nasty little pests, mm’key? It’s hard to get rid of them but apart of just spraying poison everywhere, there are only a few options left. One of those options is using a natural predator to those bugs, a predator like birds. So birds can help you get rid of bugs. I work for a company called Dashbird that help developers debug their AWS Lambda applications. See what I did there? Pests\bugs <-> birds\Dashbirds? Clever, right? Now, who do I need to call for my Pulitzer Prize?Main Reasons For Using AWS Lambda FunctionsOne of the AWS Lambda perks is that as AWS claim “You can forget all about project’s infrastructure and focus solely on launching apps in the cloud while you’ll be able to (...)
“Catch Me If You Can” - A Guide to #debugging
“Catch Me If You Can”- A Guide to DebuggingA short, motivational guide to debugging your horrible production issue.You’ve been tasked with finding a bug that has reared its ugly head in a production system.You’ve been staring at the keyboard for hours now with growing doubts in your mind about your suitability for a software engineering career; you have drawn a complete blank.You feel like a fraud, an impostor.Frank ‘A-bug-nale’ JuniorRelax. You aren’t the impostor here — the bug is.For years now it’s been happily impersonating a functioning part of the system — but now you’re onto the trail to find this fake, this fraud, this impostor — and you won’t give in.So where do you start?“What a monster... this commit message says ‘Changes’ and 314 files were changed”Reproduce the problem.At an absolute minimum, (...)
Intercept HTTPS Traffic On A #android Emulator
Sometimes we are in a situation where we want to see all the network traffic happening in a app. This can be quite troublesome and we therefor need a easy way of doing it.In this article I will cover how to intercept HTTP/HTTPS traffic from a Android emulator by using a #mitm (Man In The Middle) Proxy.For getting started we need two thingsMitmproxy (For creating our proxy server)Android emulator (For running the application on)We start by installing #mitmproxy, they have nice installation guides on their website. When using Mac with HomeBrew you can do brew install mitmproxy.After installing Mitmproxy, we need to setup a android emulator. The approach we are taking here requires us to use a Android version lower than 7. I use Android 6 (API 23).AVD example of setup with Android 6 (API (...)
It’s always interesting to try to debug a software problem you run into in daily life and see whether you can figure out the root cause. I recently ran into a problem with insurance coverage (who hasn’t?) that seemed to arise from a pretty classic software design issue. I think the example gives insight into how easily things can get complicated when software models the real world.If you studied computer science in school, one thing that might not have appeared obvious as you first learned about sorted arrays or binary search trees, hash tables or any other interesting data structure is the striking absence of semantics from these descriptions. These data structures exist in isolation, independent of any real world meaning. It is only when you try to apply them to a particular real (...)
#debugging Node Services in #kubernetes With #linkerd 2.0
Node is one of the most popular languages for microservices. With the rise of Kubernetes, increasingly, Node developers are being asked to deploy their services to a Kubernetes cluster. But what’s required to safely deploy and run Node services on Kubernetes? In this post, we focus on one specific, but vital, component: how do I understand what’s happening with my Node service on Kubernetes, and how do I debug it when things go wrong?At this point, you may be thinking, can’t I just use the Kubernetes dashboard? Unfortunately, while Kubernetes can automatically keep your service up in the event of node failure or a software crash, it doesn’t actually know whether your service is behaving correctly. In fact, a service may be returning 500’s or taking too long to respond and the Kubernetes (...)
Overcome X-Ray’s issue for #lambda #debugging
Tracing is one of the pillars of Observebility, according to Twitter. #aws X-Ray helps you to get an overview of your distributed application, to find bottlenecks and to tune its critical path. Also, it provides you with the ability to trace your requests, so you can see which journey, any single request goes through when it enters your application. AWS X-Ray can potentially be a powerful tool for debugging your #serverless application, however it’s still immature and there is a lot to improve. One of them is about its debugging ability and how it shows the errors.I’m going to explain my point it with a simple serverless application as following:Architecture of my example applicationLambda function downloads an image, saves it into a s3 bucket and records context.awsRequestId into a Dynamodb (...)
When you are working on a huge project, you may discover bugs in the code that prevent you from proceeding any further in your development. How to fix them?You can start by looking through your commit history by hand, but this would end up as a very tedious process. Thankfully, Git has multiple tools that can help you hunt for a bug or the culprit when things go wrong.Git Blame$ git blame <file_path/file_name> The git blame command helps you find the commit that created the specific line of code that causes a bug in a specific file of a project. It also determines the author of the commit, making is easier to ask for more information about the code.You can -L option to limit the line output range.$ git blame -L 11,21 new_file^95d69a196b5c7 (Jhon Smith 2018-05-18 13:04:22 +0200 11) (...)
You need to sample debug logs in #production
It’s common practice to set log level to WARNING for production due to traffic volume. This is because we have to consider various cost factors:cost of logging : CloudWatch Logs charges $0.50 per GB ingested. In my experience, this is often much higher than the Lambda invocation costscost of storage : CloudWatch Logs charges $0.03 per GB per month, and its default retention policy is Never Expire! A common practice is to ship your logs to another log aggregation service and to set the retention policy to X days. See this post for more details.cost of processing : if you’re processing the logs with Lambda, then you also have to factor in the cost of Lambda invocations.But, doing so leaves us without ANY debug logs in production. When a problem happens in production, you (...)
Think twice, cut once.A paradigm that has guided software engineers and developers over the years. Planning and thinking things out before beginning to code helps make development a lot easier and helps with developing more accurate software at the end of the construction process.However not everything is dealt with, as some bugs still get to pass through the firewall. Getting to correct errors after development is a lot more difficult, this is why I have decided to write an article to tackle this issue.There are lots of tools out there to help make development easy, increase productivity and increase the robustness of our software. But we are going to take a look at a couple of testing and debugging tools. Each one of them very powerful in their rights when used to their strengths.The (...)
Another reason why your #docker #containers may be slow
In my last blog post I was talking about Kubernetes and how ThoughtSpot uses it for its dev infrastructure needs. Today I’d like to follow up on that with a rather short but interesting #debugging story that happened recently. It re-iterates on the fact that containerization != virtualization and demonstrates how containerized processes can compete for resources even if all cgroup limits are set to reasonable values, and there’s plenty of computing power available on the host machine.So, we were using our internal Kubernetes cluster to run a bunch of CI/CD and dev-related workflows, and everything was going great except one thing: when launching Dockerized copies of our product, we saw a much much worse #performance than we expected. Each of our containers had generous CPU and memory limits (...)
#postgres: Idle queries and pg_locks
Getting postgres unstuck when it seems to “hang” or be super slow on queriesSo, I was recently trying to insert 8 million rows into a table in my database (just another day in grad school) and noticed that the query was taking longer than usual. However, if I just selected the 8 million rows, it would execute pretty fast. The table I was inserting into had no triggers or indices, meaning something was blocking the insert.That combination of being able to do fast selects and not being able to do inserts gave me the impression that the table was “locked” by a transaction or something. This had happened to me before, when I had an iPython notebook open and hadn’t closed my connection, and terminated a query midway by crashing the web page.The last time, I knew what was causing the problem, so I (...)
Ah super, merci.
Tu le configures ensuite dans le php.ini ?
Ou tu déclares le smtp dans le Facteur ?
J’utilisais Mailcatcher depuis des années, mais avec les dernières versions il y a des problèmes d’encodage / respect strict des RFC, et le dév est assez rigide là dessus donc j’ai laissé tomber.
Configurer un SMTP pour PHP n’existe que pour Windows. Pour Unix ça utilise la commande
sendmail qui est vieille et nulle par défaut, et qui de toute façon n’envoie pas vers un SMTP.
Dans le fichier de config indiqué, on dit qu’on veut aller vers localhost:1025 qui est le SMTP de MailDev.
Enfin il faut dans le php.ini, indiquer la commande qu’on veut pour remplacer sendmail (et relancer Apache) :
sendmail_path = /usr/bin/msmtp -t
C’est super simple à installer et configurer, que ce soit MailDev ou msmtp, et paf ! C’est trop génial !
Scientists plan to trick Zika-carrying mosquitoes into breeding themselves out of existence - The Washington Post
This summer, a Silicon Valley tech company will have millions of machine-raised, bacteria-infected mosquitoes packed into windowless white vans, driven inland and released into the wild — or, at least, the streets of Fresno, Calif.
And, yes, Fresno County officials are encouraging this.
It’s all part of the “#Debug_Fresno” project, which aims to cut down on the number of Aedes aegypti mosquitoes, an unwelcome invasive species that arrived in California’s Central Valley in 2013. In addition to being potential carriers of the #Zika, dengue fever and chikungunya viruses, the Aedes aegypti also adapted rapidly to the area’s residential neighborhoods, to the chagrin of residents and officials alike.
“It’s a terrible nuisance, a terrible biting nuisance. It’s changed the way people can enjoy their back yard and it’s a threat for disease transmission,” said Steve Mulligan, district manager for the region’s Consolidated Mosquito Abatement District. “So we’re looking for new ways to eliminate it.”
To do so, district officials have partnered with tech companies to use an approach that has gained traction in recent years. Inside a lab, millions of the mosquitoes will be infected with Wolbachia bacteria, which changes the reproductive ability of males. Afterward, only those male mosquitoes — which don’t bite — will be released to mate with unsuspecting female Aedes aegypti.
Even if the females lay eggs, those eggs will never hatch. Eventually, officials hope to reduce the population of Aedes aegypti, generation by generation, until they are eliminated from the area.
This year’s mosquitoes are being bred and distributed by #Verily, a subsidiary of #Alphabet that was formerly known as #Google_Life_Sciences. Verily officials estimate that this year, they will release 1 million mosquitoes per week in Fresno County, more than 25 times last summer’s numbers. That is possible because they’ve developed ways to breed and separate male and female mosquitoes on a larger scale.
Cette activité ne figure pas dans la liste des projets de Verily sur WP tant [fr] qu’[en]
• Lentilles de contact permettant de contrôler le niveau de glucose chez les personnes diabétiques
• Cuillère pour les personnes ayant des tremblements, par exemple atteintes de la maladie de Parkinson (projet Liftware)
• Baseline Study, projet pour collecter l’information génétique et moléculaire sur un échantillon suffisamment grand de personnes afin de créer une cartographie représentative d’un humain en bonne santé
• Une plateforme permettant la détection de maladie par nanoparticule
• Un bracelet de suivi de santé.
Verily Life Sciences - Wikipedia
• Contact lenses that allow people with diabetes to continually check their glucose levels using a non-intrusive method.
• A spoon for people with tremors.
• The Baseline Study, a project to collect genetic, molecular, and wearable device information from enough people to create a picture of what a healthy human should be.
• A health-tracking wristband.
• A disease-detecting nanoparticle platform. working with the wristband, a project called Tricorder
• Advancements in surgical robotics, in partnership with Johnson & Johnson.
• Development and commercialization of bioelectronic medicines, in partnership with GlaxoSmithKline
• Development of miniaturized continuous glucose monitors (CGM) in partnership with Dexcom
debugCSS : (X)HTML debugging tool built with CSS
debugCSS is meant to be loaded on an existing page to highlight potentially broken, malformed or legacy (X)HTML.
Not all “errors” are created equally, so they are color coded to highlight severity. Green is “probably not a big problem”, yellow is “worth looking at” and red is “you really should fix this.”
Ça fait quoi de gérer un projet open source ? - Frank Taillandier
Dans un sens, ces notifications GitHub ressemblent à un flux constant de négativité pour vos projets. Personne n’ouvre une issue ou une pull request lorsqu’ils sont satisfaits de votre travail. Les gens se manifestent seulement quand ils veulent pointer un manque. Même si vous minimisez le temps passé à lire ces notifications, cela peut être épuisant mentalement et émotionnellement.
Dontbug is a #reverse_debugger (aka time travel debugger) for PHP. It allows you to record the execution of PHP scripts (in command line mode or in the browser) and replay the same execution back in a PHP IDE debugger. During replay you may debug normally (forward mode debugging) or in reverse, which allows you to step over/out backwards, step backwards, run backwards, run to cursor backwards, set breakpoints in the past and so forth. Debugging with the ability to run in reverse allows you to hunt down bugs much more easily. It also allows you to understand the runtime behavior of large PHP codebases more (...)
Opening a new instance of your Mozilla application with another profile - MozillaZine Knowledge Base
Ouvrir deux instances de #firefox en utilisant un profil différent (pratique pour tester ou débuguer une extension).
firefox -P -no-remote
Very good analysis of their own bugs by the #Tor project. Every programming team should do the same sort of abnalysis on their own tickets. Many of the bugs are C-specific but there are a lot of language-independent bugs.
#remote Debugging Devices | Web Tools - Google Developers