The other day, after playing a bit with GoAccess I found that the numbers didn’t add up with my in-app tracking, and I decided to take a slice of access.log and eyeball it to see what’s going on. What I found was discouraging: lots an lots of bot and crawler requests. As disappointing as it was, it was still good to find this out and adjust my perception to reality.
My current meditation practice is a sort of mindfulness meditation: it’s intended as a way of training attention, focus, and self-awareness.
My name Vlad, and I still like to
make things in 2022, as in GNU Make. 🙃
Recently I was discussing with a friend that was thinking about developing some programming skills.
For a while, I was collecting the DMARC reports, just in case I can find something useful in them. I didn’t, but I liked the lil script that I wrote in this Apps Script from Google. It’s like VBA for Microsoft Office — if you ever heard of it. If not, it’s automation for Google apps and services.
There is this lil program in moreutils called
ifne. I use it in shell pipelines, to execute a given command when there is some output. A quick example:
The Docker composition on one of my side projects has recently got to 6 containers: SMTP-in, SMTP-out, app, subscription, website, and certbot. Since I have deployed a
0.1.0 version to DigitalOcean a couple of weeks ago, I caught myself feeling increasingly anxious about losing logs every time I deployed a new version of the container.
A couple of months ago I’ve set out to write a lil RSS-checking program that I thought would be useful for a friend. As a small green-field project, I thought it’s going to be perfect to — once again — try that hippy TDD method that everyone was talking about 10 years ago. In retrospect, a few things came in really handy while writing this program, and wanted to share them.
My meditation breathing exercises have been on and off in the last few years, and I have lately stumbled upon a couple of things that made it easier for me.
I have recently played with the idea of setting up an SMTP server for a friend’s custom domain, and wanted to share the working setup.
I have a more or less ancient iPhone SE 2016, with 16GB of storage. For the past year or so, the storage was filled up to 15.5GB most of the time. I kept juggling the apps by offloading and restoring the ones that I only needed once a week. Lately, some of the apps that I use grew past 200MB in size, and I got to a point where I just didn’t have enough space.
If I were to give a single piece of advice for easier journaling it would be this: make it handy.
Last week I helped a friend move their blog subscribers from FeedBurner to Follow.it.
The other day I found myself in a conversation where I was recommending journaling to improve self-awareness and the capacity to analyze issues small and large. Then as I thought about that conversation later, I realized that for someone who didn’t journal for at least some time, it may sound too grandiose and unapproachable, and so I thought that I should have suggested an easier way to begin. After that, this idea was bubbling again and again in my mind, and so here I am explaining it here.
On my 30-th week of Angular, I learned something that I was looking for since the first week: a lightweight way to get a “parametrized” piece of view. Coming from a couple of years of React, I was used to having function components to abstract away noisy bits of a view, and for some time I thought the only way to get that is to get such a thing.
Here is a small post about working with small companies.
Every now and then I end up in a messy codebase. It’s scary and discouraging to try to fix a bug in there.
I have recently switched jobs. This is the main reason why I haven’t written on my blog for a while: I wanted to focus on getting familiar with the new household.
In 2014, I wrote about a couple of things that I liked about Angular, then at v1.4, I think. Now, as I’m getting on Angular at my new job, and I’d like to share the things I like again. So far, the concepts seem familiar, and I will only comment on the things that jump at me, from the perspective of a newcomer.
I’m a heavy console user and I like my shell history to be relevant to the project that I’m working on. For example if I
~/src/mixbook_editors, I want the shell history for that specific project—this is what I mean by per-directory Bash history.
On my side project, I strive to have as good of a unit-test coverage as I can. Because I define the input and every outputs of a scenario handler, there can be a lot of execution paths to unit-test, and so it can get pretty tedious to cover all of them. This is why I’m employing a technique that resembles data-driven testing.
One of the things on my side project that I felt iffy for some time is the UI toolkit. I have gathered notes, links, fonts, but I have held back from actually trying anything so far. I wanted to first have a robust setup that would allow me to add functionality, frontend and backend. Having that more or less in place, the goal that I had set for this sprint was to look for a UI toolkit. I have recently heard about Tailwind CSS on “The Art of Product” podcast and I made a note to take a look at it.
A few months ago a friend asked for help with the degrading quality of their web host. At that time they had an old all-in-one service that was hosting their static website that they edited by hand, DNS, and email. I have done that a couple more times for the domains that I owned and for my other people, and I offered my “solution”:
The Change Email feature on my side-project broke a few days ago.
I would like to tell how I have done the third-party service integrations on my side project. Email, file storage, error logging are a few examples.
Bash scripting still turns out useful, even in 2020. 😉
I was cleaning up my NPM modules on my side project. Since almost from the beginning, I have had 2 “child” package.json files, one for the backend and one for the frontend, and the “main” one in the project root.
I have a confession to make: I’m a bit of a UNIX geek. You can tell that by looking at my dot-files and also by the fact that I have a
Makefile in most of my repos.
This week, while working on the email change scenario on my side project, I realized that my tests are not transactional, which meant that their changes to the DB could persist across test runs and so tests could influence each other. Hm… I thought I fixed this before.
The other day while browsing through my side-project’s code I realized that I don’t have unit tests for the shared modules.
In my last post about my side project I have mentioned that I have extracted 2 shared bundles to increase my build speed, and one downside of that is that now have two more requests for every page, and this week I have implemented a small tweak that will compensate to that: indefinite caching.
This weekend I have finally got to optimizing the TypeScript build for my side project. Because page bundles included both shared modules — one for the code shared between the backend and the frontend, and one for the code shared between the pages — they were getting longer to compile.
Today I would like to explain how I arrange validation and error handling on my side project. One useful outcome of using TypeScript on both sides — backend and frontend — is that I get to share the data structures, error states, and also the validation logic. And it’s not as much about sharing the code itself, but about the ability to keep the two sides aligned as the code evolves.
Hi. My name is Vlad and I missed my weekly goals.
One of the items that I had planned for this sprint was to fix the deployment system. Well, the “system” is a bit too grandiose for a Bash pipeline in the
Makefile. The essence is that I didn’t pay too much attention to it after a couple of initial deploys, and then one day I went to the public URL and the app didn’t come up. I logged into the DigitalOcean server, and felt lost: didn’t really remember the commands to check for the system service status, didn’t know how to verify if the code is up to date.
One thing that I didn’t feel completely content with regards to the work on my side project was that I sometimes was getting lost down some rabbit holes, mostly on technical matters, like getting some makefile right or getting types right in TypeScript. This could take entire mornings with nothing to show for, and when this came out a couple of times during my own weekly retrospective, I decided I should do something about it.
A couple of weeks ago I wrote about the P/PC Balance, and while thinking about it some more, a kind of comic realization stroke me: I realized that one good reason to prioritize feature work above technical work on a project is that the former is finite, while the latter is potentially infinite.
On the side-project that I’ve mentioned before, I’m making a priority of 2 things: (1) use the least amount of libraries and frameworks, and (2) organize the code in a way that reflects the logical structure of the app.
#user-work vs. #tech-work == P vs. PC
One awesome thing about side projects that I get out of a side project is that I get to try my fanciest ideas. On the most recent side project, one thing that I got to try is sharing TypeScript logic and types between frontend and backend code.
I have a couple of Jekyll-based websites, and my
make start looks something
start: bundle exec jekyll serve
This works. I run it in another terminal tab, and
^C it when I’m done. The
other day though, I thought it’d be nice if
make start would run in the
background and then say
make stop when I’m done. Here is what came out. 🤓
The other day I was writing a Makefile which involved
nvm and stumbled upon an error that
seemed to make sense, on one hand, but on the other hand I couldn’t quickly
google out a clean solution. Digging in some more, I’ve devised my own, which
I’m going to present here. 🤓
I’ve launched a new Jekyll website recently, and one thing that I wanted to be able to do on the very first days is to be able to have different URLs for a single post. 🤔
Use-case: I’ve published an article on the blog, but the topic is one that comes
up frequently enough that I want to have it on the FAQ page, but also have
a simple one- or two-word permalink that I would be able to tell someone on the
phone, for example
The other day I found myself copy-pasting some Google Docs texts into a new
Jekyll website, and so I had to format quite
a bunch of lists. After Google Docs, the reflex was to select the rows, and hit
⌘+Shift+8, so I thought: Hey why not make a key-mapping? 🤓
Today I launched on a new project and there was a specific Node version
required, specified (strangely) in
package.json. I’ve expected it to be in
.nvmrc, but never mind, I had to get it working, and I wanted it working with
make, as I do for every new project.
One of the things that attracted me early on in Elm were the union
types: Having the compiler
ensure that discrete values of a variable are correct seems quite useful. And it
was as disappointing when I couldn’t find out a type-safe and reasonably
straightforward way to build a
<select> tag out of a union type. I’m
emphasizing type-safe because Elm’s type system is the reason why I’m learning
it. Conceptually these two things — a union type and a dropdown — align
perfectly, and I thought it should be a way to code it as well.
A few weeks ago I have set out to try Elm on a toy project of mine. The experience was like learning to program again: I had to figure out very basic things like how to attach an event handler to a field.
The other day at work, as during a proof-of-concept task, I needed to take a screenshot of a list of HTML pages, but massage them a bit before that. The list of pages could be long so I needed them to run in sequence.
I have a small module on NPM and I found myself tweaking it more than a few times lately. One piece of routine related to this kind of work is Git tag management: I want to have a tag for every new version that I publish on NPM. This is handy if you want to get a specific version of the module directly from the GitHub repository.
I have a side-project where I use tape for testing. A few days ago I stumbled on a test that I thought should fail, but passed.
The other day I’ve stumbled upon the an article entitled “Testing is not a phase.” — It reads like a list of truisms. And then it came to me: Well, of course, we all do test-drive things! Let me explain.
I fiddled with a couple of servers in the past weeks and one of the
things I needed immediately was email. I wanted to allow
cron and the
webapps to send out emails.
This morning I was working on a
They say that in Ruby if you think “I’m wondering if there is a function that does X” then it probably exists. More and more I find that is true about Vim too.
TLDR: Although Vim documentation says “Abbreviations are never recursive,” you can get abbreviations to recurse by escaping to the command mode.
Every now and then I come across a scenario where I need to unit-test
some code that navigates across pages by directly changing location.
Some time ago I have accidentally stumbled upon a solution: the
The other day at my day job I needed to change some buttons to ask for confirmation before executing the actual action.
Last weekend I’ve watched the free introduction on Redux and I think I got it. Redux has:
At my day job we often need to write low-level JS code without any
framework or library handy, and we often end up re-inventing some of the
executeInParallel is one of those wheels:
I have a friend. He was a lawyer, but a few months ago he realized he doesn’t enjoy it, and decided to change countries and profession: he moved, and now makes wooden toys. He said he wants to try to sell his toys online and asked for advice on how to do that on the cheap.
The other day I was putting together an ad-hock
where I had just one JS file for a prototype page. I was inside a git
repo and I didn’t want to have additional files, so I kind of resisted
the idea to have a
.eslintrc file, but I can have a
Makefile — I
have that in my
~/.gitignore, so I can easily add one here and have
all the messy bits hidden inside it:
At some point I have heard Uncle Bob saying that:
I do most of my work in the console, and when I work on a task, I
usually have a task-specific
I have recently read this article
“Don’t Make Me Remember Things”
where the author complains about string’s
indexOf method having
less-than-ideal API. Specifically, about the case when the sought
substring is not found:
indexOf usually returns a nonsense value like
-1, and the developer has to remember that, which leads to
From time to time I stumble upon yet another article mentioning that humans are just bad at choices. I think accepting it as a truth is detrimental, and I’d like to disprove it.
I’m working on a little basket widget, and while thinking about the
model I caught myself unsure about how to handle validation errors. For
example: while instantiating a new
Product, I need its ID, name and
price, but what should I do when price is not a number?
I usually keep my project notes in Workflowy¹ and today I found a new handy thing I can do within it: ramble.
Every now and then, I set out to write an article about some Grand Idea® that just came to me. It usually happens when I read something dramatic rant on something.
The other day I was putting together a little UI to collect emails: an input and a button. So I wanted the email to be take in when the user clicks the button:
The other day I wanted to get some data from an API. The API is giving the information paginated, so I have to fetch it page by page.
For the past few weeks I got a bit stuck with one of my side project’s UI. I have had some vision of how that particular form should look like — which sections there were and how they were positioned, looked quite nice and it worked well so far — but now I’ve got to a point where I needed something else to fit in, and it won’t let me. And there I was stuck.
I have heard that people resist testing UIs because “they change often”, and my oppinion is that from the perspective of “tests as safety net” UI testing is as valuable as any other kind of testing.
OOP wants together behavior and data that change together. FP wants behavior and data separate so that the behavior can be used with more than one kind of data. JS makes the two collaborate well “for a greater good.”
A few months ago I’ve switched one of my side projects from CommonJS modules to plain JS namespaces, and in this post I’ll explain why.
PersonSection widget I needed to have a
There is this phenomenon in JS called “function hoisting.” It’s regarded as odd to newcomers but I found it improving code readability and use it every day.
On my front-end side-projects I mostly did test-first development and it worked pretty well. But for my new job that I began recently I found myself struggling really hard to do TDD, and eventually gave up and coded test-after.
One of the first things that I learned about CSS is that it cascades. Cascading is a lot like inheritance in OOP. It’s useful for the same reasons, and, for the same reasons leads to CSS fragility when misused.
6 weeks ago I have switched jobs. It’s a big change and it’s also good time to review other big things.
I use one non-academic guideline that helps me decide what and how to test in my code.
There was a video on TED called “The paradox of choice.” I have never agreed with this idea that more options make the choice harder. I have criticized it a while ago on Facebook, but today I share my understanding of its mechanics.
More than a few years ago I decided I want to work on my own business. I’ve been learning quite a few things from books, blogs, and podcasts, and even tried a few things. But I think today it has become clear to me that business ownership is not my thing.
I remember how amazed I was while reading Kent Beck’s “Test Driven Development: By Example.” Automated regression tests sounded very useful. But it was not obvious how to apply that in the context of web UIs.
In the last post on Travis Neilson’s mailing list, he’s sharing his thoughts about motivation and proposes some solutions.
In the episode 21 of “Giant Robots” podcast Jim Gay is invited to talk about the DCI concept. The original document explains it with an example about saving accounts. Jim tries to explain it with an app user. I find both examples somewhat unhelpful, and thinking about this subject a little more, I think I found a better one.
In my last article I said that I have started a little study by following thoughtbot’s trail maps. After Heroku, I’ve picked Git, and today I will write about the things I’ve learned from it.
I don’t have a CS degree, and most of what I know I’ve learned along the way because I found it interesting or because I needed to solve a problem. It worked pretty well so far, but sometimes I feel like I need a bit of structure around it, usually when I’m trying to make sense of a bigger picture.
I got into React.js lately, and one thing that I have noticed right away
is the boilerplate that I have to type for every component. For example,
if I have a
Button component, I have to type this:
A few days ago I have finished reading “Practicing Rails” by Justin Weiss. I liked it so much that I wanted to write about it.
I often think about how Functional Programming (FP) compares to Object Oriented Programming (OOP).
I have recently shared a link to the one of the recent episodes of “Late Nights with Trav and Los” podcast: “Why You Should Be A Publisher.” I’m mentioning this because I find writing is a very interesting subject in how it affects how I understand things, and how I see and understand myself.
This my first day back to my day-job at Assembla. My plan is to find an hour every day to work on my project.
This is the last day of this sprint. I’m far from an MVP, but I have scratched the surface of what’s possible and this gives me some more visibility for the next steps.
|It looks like I’ve caught a cold during my travel. Happy Friday. :-|
Yesterday I traveled to Bucharest (and I have slept the first half of the today to recover).
Today I worked on getting the data collection/population of the case entry form.
Monday. In the morning I have watched the React video course on FrontendMasters, by Ryan Florence. Pretty good. I can’t say I found a ton of new things but it’s good to get confirmation that what I know are about the right things, and also give the whole thing a bit of structure in my mind. Fundamental things are well explained. There was a nice quick intro to Flux, which clarified by vague view on it.
Today it’s a different day, it’s Saturday: until afternoon I dug channels for our drainage system in the back-yard. I did my best to escape out of there around 16:00 and got to the office.
Having your own business is in many ways similar to being employed: you make a long-term commitment, you take on some responsibility, you do the work, and you get payed for it.
Today I worked pretty smooth once I got into the flow. And I feel a bit more tired than usual and I have some theories on why.
In the morning I’ve spent some more time thinking and googling around about automated testing. Not finding anything that I would like to give a try, burned a hole into my motivation. Now I realize it’s a good idea to do this kind of research later in the day, when most of my brain power was put into useful work.
I wasn’t very productive on day 2. I have burned the first half of the day trying to write the least meaningful test and failed. I admit that I was not prepared for that: both Chrome apps and React are new to me, and it’s just too much struggle. Both are unlike anything I have worked with so far and for the sake of making at least some progress, I will first get more familiar with them.
I wrote about this app for bailiffs that I started to build and failed. I also wrote that some a couple of weeks ago I went with my partner to a former colleague of his — a bailiff — to interview him and see how he actually works and if there would be any value in building an app for them.
One of my side projects that I’ve been toying with, is a productivity app for bailiffs. And since I’m reading “Lean Customer Development” by Cindy Alvarez, a few days ago I went with my partner to interview a bailiff — a former college teammate of his.
Last night I have finished re-reading Drew Neil’s “Practical Vim” and I gathered a whole lot of little things that I want to try, and include in my workflow if they fit.
My articles here so far are more awkward than not, and I was a bit confused about why would that be. I was wondering about that because, if I look at my emails, I generally consider them as coherent and well put together, I even take some kind of pride in that.Then how come my articles are not that good? I think I have an answer and it’s in a way similar to my theory about why public speaking is generally considered hard.When I write an email, I generally have a clear subject, and a known audience—a specific person—and I write about a specific aspect about the subject. And I believe these two knowns is what makes it relatively easy to write a clear and coherent message.On the other hand, in case of blogging this is not the case. Although I may know the subject, I don’t know the audience at all, and whether they are interested or not in the specific aspect of the subject that I’m trying to talk about.I think this is what makes it hard: if I don’t know you’re interested to hear about X, I will be reticent speaking about it, and I will probably fall sideways into other things that I guess may be more interesting to you.So my theory is that this is what makes blogging—or public speaking—hard, and from here I think it’ll be easier to find a way out. Yay!
About a year ago I wanted to jshint only files that have changed since the last run, and with Grunt I had to write custom code to do that. I used to be able to find my way through Makefiles in FreeBSD ports when I was a kid, so decided to try make.
When working with asynchronous procedures in Node, I find promise chains help me write pretty readable linear-looking code:
I have a little Tonido plug on my fridge. For last 4-5 years it proudly served a couple of static websites, hosted the DNS zones for a few domains, and the SMTP redirection for those few domains. It didn’t hold the messages, just forwarded them to some other email service, like GMail.
This week I had a couple of harsh days.
The Firebase JS library is callback-based, which feels pretty cumbersome after I got used to promises. So, the other day I wanted to have a FirebaseClient object that given a Firebase URL and credentials would give me a simple way to read and write data to it, something like this:
I have a deeply nested loop of promises that query a remote API, and I had them logging their time by default, like this:
I’ve seen .env being used in Heroku projects, and also in a RubyTapas episode about Dotenv gem, and I kind of liked it. But I’m reticent to add more libraries or tools to my toolset, especially if they’re language specific like Dotenv.
When wrapping an API client I found myself wanting to set a timeout for promise-based methods. I first used setTimeout to reject the deferred promise after a given amount of time, like this:
For some time I was looking for a way to safely store my app secrets like API keys. Environment variables are OK, they work, but I found it cumbersome. I had a Heroku project where this worked with a .env file that looked like this:
I have recently read “Smalltalk Best Practice Patterns” and since the idea of pattern is fresh in my mind, I want to share a function naming trick that I use many times.
Last Friday, on my way home, I was wondering why did spend that long hours every day of the week. And the week before? I was getting work done, but somehow I was not seeing my work as good as a couple of weeks ago. I found myself counting 11–12 hours between when I left home and when I came back.
It’ll take some time for the peace and comfort to become stability. I think it’s OK to lean on it for a while and enjoy its comfort. Even if it may feel like a plateau sometimes, that is fine: that stability is the very thing that will let your innate curiosity overcome the fears accumulated along the time and drive you towards exploration. The exploration in turn, will help you find what makes you happy.
The common way I’ve seen JS promises being explained is something like this:
It’s innate for any human being to try to understand how things work. I will share my reasoning on why my life is as good as it is. I plan to split my findings into short posts and knit them along the way.
For many years I’m fond of productivity and its inner workings and I have one trick that works particularly well, described by my status in messengers:
As I mentioned in my previous article, I just finished reading the book “On Writing Well” by William Zinsser. I want to clarify a bit why am I so excited about the subject of writing.
I just finished reading “On Writing Well” by William Zinsser. I enjoyed most of it. I’ve skipped the chapter on sports writing because sports is not a subject I find particularly interesting (but I’m reading it now). I feel a bit disoriented now: I’ve read a lot of good advice from a such master, and I can’t say that I know the precise next steps to improve my writing. I think I should have took notes.
It’s not that I could argue with DHH regarding TDD—in technology he’s at a level that I may never reach. Mr. Kent Beck had his say on that article, and also Mr. Robert C. Martin, although not as to-the-point as Mr. Beck’s.
This morning I got to the “Business Writing: Writing in Your Job” chapter in the “On Writing Well” book by William Zinsser. I found many things I wanted to write down and share, but instead of retelling it I thought I will just quote a good chunk of it and let you enjoy the original. It’s pretty long for a blog article, but it’s an easy and pleasant reading. I’ll start with the second paragraph since I think it goes straight to the point. Here it goes.
One tricky thing about testing promises is that they handle errors thrown by their .then() callbacks. So I have a test like this:
I try to limit the amount of magic that I allow in my worldview, as too much of it can cause confusion.
Accepting Diversity in people as a good thing, and understanding its implications gave me a much better life.
I just finished reading Robert C. Martin’s book “The Clean Coder”.
One thing that I found interesting in the “Apprenticeship Patterns” book is the emphasis it puts on blogging. It’s not that this surprised me, I have heard about this many times, and I think I understand its benefits, but one notable thing is that it gives ideas on what to write about, and one good reason: to use it as a tool towards a better understanding for yourself.
In a previous post I said that I recently went to a JS meet up, and I was left with the impression that the presentations would have been more useful if they were more narrowly focused: maybe take a specific problem and explain how a particular framework helps in solving it. Then I thought, what exactly do I mean by that? So here is what.
Hello world! Again!