This blog post is a collections of programming books that comes up most often in various discussion on this subject. The data was Scrapped/Polished with LLMs so take it with a grain of salt. Rank Book Title Authors Mentions 1 The Pragmatic Programmer Andrew Hunt, David Thomas 7 2 Designing Data-Intensive Applications Martin Kleppmann 6 ... Read more
Implementation 1. Getting OpenAI API Key 2. Install OpenAI module In your command line run 3. Generating the Transcript Modify and run the following Python script Example Back Story from 2018 In 2018 I wrote a blog post titled Transcribing Speech to Text with Python and Google Cloud Speech API. Back then, the task was ... Read more
I wrote the following tool to do load test on Google Cloud PubSub. It s a pretty simple but effective tool to generate a lot of data. This assumes user is using gcloud auth application-default login for credentials. In this particular examples: Every third request is adding a different attribute. Python dict as a payload that ... Read more
Localize.js is a great service. Gone are the days of having to internationalize your websites by hand. That being said, existing UI has a pretty annoying in my opinion limitation there is no way to add phrases manually. 99% of the time, Localize.js is able to automatically pick up all of the phrases on ... Read more
Golang does not have built it sets. Basic functionality can be mimicked using maps with empty struct{}. Another option is to use a Boolean value, but empty struct does not use any space and therefore more efficient. Another benefit of empty struct is that Boolean value can be set to true or false, which could ... Read more
I recently watched the following speech by Arnold Schwarzenegger: It had a lot of good points, but one quote by Ted Turner really stood out for me: Early to bed, early to rise, work like hell, and advertise Mr. Schwarzenegger then went on to explain the meaning of the second half of this quote. It s ... Read more
Here are the steps that I too to merge multiple GitHub repos into one, while preserving all commit history. The process took about 30 minutes for 5 repos. As a result, I feel like my GitHub page is cleaner and code is actually better organized and easier to find. TLDR: Create new repo (or use ... Read more
One year ago I decided to stop self-promoting this blog. Previously I would spend a lot of time submitting my links to Social Media sites such as Hacker News and Reddit. It was taking up a lot of my time and attention. I even got a warning from Hacker News admin for repeatedly submitting links ... Read more
I often find myself with logs in the following format, exported in CSV. First column is timestamp in milliseconds, second column is timing for some request, also in milliseconds. Often I d like to see the min, max and average request time, group by day and hour. Here is how to get this insight using Pandas ... Read more
I was investigating a bug that would only happen in production and wanted to attach a debugger to a particular workflow. I could have run the entire application and attached remotely, via: In my case, I wanted to invoke a specific method and see what happens via Scala REPL. Turns out it s pretty easy to ... Read more
Update: 2021 I am now happily using new editor I usually update my WordPress as soon as I can for security reasons. I tried WordPress 5 and I did not like it. My main complain is that I write in WordPress using Markdown and it is not well supported in WordPress 5. My posts were ... Read more
Ammonite is an interactive REPL for Scala, kind of like ipython is for Python. I usually use IntelliJ IDE for Scala (which has a REPL and debugger among other things). Ammonite is great replacement though, when I don t want to start up full blown IDE. It s really easy to get started with Ammonite. First it ... Read more
My wife and I were watching Jack Ryan, where John Krasinski is playing an FBI analyst. I wanted to be like him, so I began to look for things to analyze. In the past I ve done text analysis for comments left on Mark Zuckerbergs Facebook post, which I described in I Tried To Virtually Stalk ... Read more
In this episode of tech companies behaving badly, I would like to call out Yelp for forcing users to download their mobile app. I am 90% certain that I was able to get full experience on mobile Yelp in the past. Now it forces me to download a mobile app if I want to view ... Read more
My work used to be three miles away from my house, which was a huge blessing and my commute was guaranteed to be under 15 minutes. A month ago my work moved Closer to my house. Now my commute is only 1.3 miles, making it an enjoyable 30 minute walk. I live in San Francisco/Bay ... Read more
I should be able to lock my phone while using YouTube and still hear the sound in the background. Currently this functionally is only available to YouTube Premium subscribers for $12 a month. This is a bad business practice for YouTube and a bad thing for the world. Bad for Youtube Why is it bad ... Read more
There are two philosophies when it comes to package installation, global first and local first. Global meaning all applications that rely on a certain package have access to the same copy of the library that was installed once. Local means that each project has its own folder of dependencies installed specifically for this project and ... Read more
A bit over a year ago I decided to disable Accelerated Mobile Pages (AMP) Project on this site. I have a long history with AMP and at some point I was one of it s main critics. I ve since accepted that it has a role to play, with no valid alternative. At the same time, I ... Read more
As smartphones have become part and parcel of our lives to the extent that they almost have engaged us, it should be made sure that we effectively navigate the perilous minefield known as life. From ensuring that we don’t miss any necessary birthdays, occasions or dinner dates, mobile phones nowadays can also provide you reminders ... Read more
My company hired a new VP of Engineering. He asked me an interesting question during our one-on-one: What makes you a good engineer? . I had to think about it for a second and I realized that it wasn t technology or knowledge of certain principles. Obviously there are certain skills that one needs to have to ... Read more
TLDR; Use blue page icon in the title bar (see image bellow) or about:reader?url= in front of your URL to switch to reading mode in Firefox. New FireFox has a Reader mode, that you can activate by clicking on the document button, highlighted in blue (in the nav bar) in the screenshot above. Part of ... Read more
I am taking a cyber security class. This week s assignment had us work on Honeypots. Honeypot is a server that pretends to have a vulnerability of sorts (open ports, old software etc.) and instead collects data on people who are trying to hack it. At the end of the experiment I ended up with some ... Read more
Here is a simple trick that I used to restart my python script after unhandled exception. Let s say I have this simple script called test.py that I want to run forever. It will just wait 2 seconds and throw an error. I use the following script called forever in the same directory: It uses python ... Read more
I am attending a Cyber Security course provided by CodePath and sponsored by Facebook (thank you). During SQL Injection week I found myself very frustrated. I felt like I did not have a process that I followed and instead was copy-pasting various commands in hopes that one will eventually work. I wanted to share the ... Read more
Update 02/18/2018: Expected search result is back on Google. Perhaps it was just a bug after all. I use AngularJS (aka Angular 1) in my daily work. When I need to look up documentation for something specific, I just search for it on Google. At least I used to do that. Few days ago ... Read more
Few weeks ago I decided to take it easy on my Social Media use. Top 3 social media sites that I visited were Facebook, Twitter, and Reddit. I miss Reddit the least. I still visit Twitter for direct mentions, but I don t miss my general feed all that much. I really miss Facebook. Facebook is ... Read more
I wrote a post 8 months ago titled It’s OK to Still Use Angular 1 in 2017. There are still a lot of companies using Angular 1 in legacy products and it is OK. That being said, some of the arguments that I made in my last post no longer seem valid. I wanted to ... Read more
This tutorial will walk through using Google Cloud Speech API to transcribe a large audio file. All code and sample files can be found in speech-to-text GitHub repo. Transcribe large audio files using Python our Cloud Speech API. @akras14 shows how https://t.co/dY56lmE0TD — Google Cloud (@googlecloud) January 11, 2018 View Post Sample Results This ... Read more
All shared Google Photos are open to the public, even if they were only shared with specific people. This is different from Google Drive, where only people granted permission via the Share with others drop-down are able to view the content. Below is a screenshot of my private album (that I shared with one person) ... Read more
TLDR; Using pandas (pip install pandas) Using native csv.DictReader Reading as a List Let s say we have the following CSV file, named actors.csv. You can download this file here. The first method demonstrated in Python docs would read the file as follows: Open the file Create a CSV reader Skip first line (header) For every line (row) in ... Read more
There are many use cases for converting JSON to a dot notation. For example, my current company used Hue to query our log data. Our logs are stored in JSON, and Hue queries expect a dot notation. For example, this JSON file Will look like this, when converted to dot notation: Note, I am starting ... Read more
Recently I was working on a fun idea, that was going to take me longer than one week to complete. Towards the second week I found myself dreading going back to work on my fun project. I wasn t sure why Was I no longer excited about the idea? Was I just too tired? Was I ... Read more
Bitcoin Energy Consumption Index is an attempt to estimates total energy cost of mining Bitcoin. Their methodology is based on the fact that energy needed to mine Bitcoin will increase in response to oversupply of mining resources. To quote the Bitcoin Wikipedia article: Every 2,016 blocks (approximately 14 days at roughly 10 min per block), ... Read more
Have you heard of Hacker News? It s a great mini social network dedicated to all things tech. Once a month they post a thread called Ask HN: Who is hiring? , where anyone can list their job openings. With hundreds of comments it quickly gets overwhelming. Turns out it s very easy to get the same data ... Read more
Bellow is a list of tools that I find helpful as a web developer. Mozilla Developer Network Mozilla Developer Network MDN is a great HTML/CSS/JavaScript reference. It is sponsored by Mozilla a non-profit behind Firefox, but anyone is welcome to contribute the content. W3schools Beginner friendly tutorial site. I learned my first HTML, ... Read more
What does 1 + 2 + 3 equal to? It was 6, not anymore. Apple released its new operating system (iOS 11) for iPhone on September 19, 2017. One of the updates was a redesigned calculator app. Mid October, a post titled Try quickly typing 1 + 2 + 3 into the iOS 11 Calculator. ... Read more
Background Few years ago I found myself in a bad situation. I accepted a job that was not a good fit. After sixth months I hated my job and was ready to quit. At the same time my wife and I just found out that we were expecting our second child. She asked me to ... Read more
Two weeks ago Microsoft released a new version of Visual Studio Code (VSCode) which updated their default icon from a blue infinity sign, to something that looks a little strange and very orange. Most people who do not use VSCode will probably fail to see what the big deal is. If anything, it looks much ... Read more
A lot of people don t like the New Visual Studio Code (aka VS Code or just Code) icon and they prefer the old icon better. I am one of these people. I was inspired by this comment to bring the old icon back. If you want to do the same on MacOS, you can:Note: For ... Read more
Chrome Developer Tools have a very useful option that allows to copy any API request as a CURL command. This tool can be used to test APIs without having to rely on the Browser, get access to unofficial APIs, scrape data and many other useful scenarios. Please allow me to demonstrate. In this video, I ... Read more
Two recent post of mine were ridiculed on r/programmingcirclejerk: Building a Simple Stopwatch App with Electron Submitted by someone as Building a 100MB stopwatch app. Compile Node.js to Native Binaries Submitted by me as Making 60Mb ls clone in JavaScript. I submitted my own post, because I enjoyed the humor in those threads. ... Read more
I ve recently ran into issue where our projects were expecting to run with SBT version 0.13.12, but the only version that was installing with home-brew via brew install sbt was 1.0.1. Global Setting I ve Googled and realized that I can install older version with brew install sbt@0.13 but this installed version 0.13.16 which was still ... Read more
I created a light weight RSS reader for people on poor internet connection to get latest headlines: https://alexkras.com/textnews/ I am kind of away form keyboard, but saw that Tweet from @samccone pointing out that http://lite.cnn.com/ was making users download a lot of JavaScript, and now it seems down. https://twitter.com/samccone/status/906714941360553986. I wanted to provide a ... Read more
I d like to open with the following comment on one of my anti-AMP shares, that I received today. HI I see that you have constant opposition to AMP because it renders badly on iphone. Do you know how expensive is DATA here in 3rd world? Native websites, force people to load trackers + install stupid ... Read more
Two month ago I wrote at length how Twitter was redirecting links on mobile devices to AMP versions of the content. Served not from AMP Cache, but from actual site s web servers. Few weeks before that, I wrote an article asking to make AMP links optional in Google search result. Based on how well it ... Read more
Yesterday, I read an interesting article titled The Why and How of Google AMP at Condé Nast. I ll let Condé Nast introduce themselves in their own words: Condé Nast is one of the world’s most prestigious publishers. You may recognize some of our brands which include Ars Technica, Bon Appétit, Golf Digest, GQ, Pitchfork, The ... Read more
At my work we have a Python library that interfaces to all our API micro services (that are written in Java/Scala). It is a very useful tool for debugging and working with our platform, so I spend a lot of my time in a Python REPL. Often times I find myself needing to hit multiple ... Read more
Recently I had to debug an issue with Xvfb server. It was hard to debug, because I was not able to see what was going on. I was able to reproduce and fix one of the issues by mimicking the build server in a Vagrant box. When I tried the fix on the build server, ... Read more
We run our protractor tests in Chrome instance via xvfb server. Last week after Chrome update to 60.0.3112.90, it began to fail with the following error. The solution was to use an older version of Chrome driver for Selenium, via the following command:
Sources view in Chrome Developer Tools has a code snippets feature, kind of like a built-in text editor, that allows to write, debug, save and re-use code snippets. Creating a code snippet To get to code snippets: Open the Developer Tools Navigate to Sources at the top menu Select Snippets in the left menu (see ... Read more