Spiro Sideris writes: To write understandable code, always ask the question of who your audience is. What level of experience do they have? What are the prerequisites they should know before reading this function? There are even differences in the semantics between programming languages, so knowing the best practices, and the language coding style, will ensure you are writing readable code for developers in that language. Writing Code Like a Mathematical Proof
Rule 1. You can’t tell where a program is going to spend its time. Bottlenecks occur in surprising places, so don’t try to second guess and put in a speed hack until you’ve proven that’s where the bottleneck is. Rule 2. Measure. Don’t tune for speed until you’ve measured, and even then don’t unless one part of the code overwhelms the rest. Rule 3. Fancy algorithms are slow when n is small, and n is usually small.
Sam Schillace writes: I was talking with the engineering team at Box about what I’ve learned along this journey, and what came out of that conversation were my personal engineering principals. These aren’t rules or engineering guidelines. They’re simply the principles that I pay attention to when I write and operate code. These include: Be paranoid. Don’t lie to the computer. Keep it simple. First rule of optimizing: don’t.
Jim Bird writes: Using run-time flags like this isn’t a new idea, certainly not invented at Flickr or Facebook. Using flags and conditional statements to offer different experiences to different users or to turn on code incrementally is something that many people have been practicing for a long time. And doing this in mainline code to avoid branching is in many ways a step back to the way that people built software 20+ years ago when we didn’t have reliable and easy to use code management systems.
Never say: “Do as I say, don’t do as I do” Create An Environment Of Play Manage What They Consume Interrupt Negative Self-Talk Actively Remind them to be Grateful Make Rigid Routine Days Mandatory Encouraging Curiosity and Asking Questions Encourage Independence From Diaper Years Never Teach Them Ugly Ideas About Money Let Them Have A J.O.B. Answer Their Questions With A Question Pour On The Hugs and Kisses 12 Ways To Instill Your Kid With An Entrepreneurial Mindset
Bruno Filippone writes: One of the easiest tricks to ensure your software will live longer is avoiding to write code tightly coupled to libraries and frameworks. Reducing the number of dependencies of your codebase is always a no-brainer. Making sure the majority of the code you write does not rely on a gazillion third-party libraries should be a priority. How Code Becomes Legacy
Ruairidh Wynne-McHardy writes: We are all attached to the things that we create. From our relationships, to our work, to trivial things like the way we decorate our home — we don’t like to destroy things that we have put effort into. That’s why it’s even more important to delete your code. Never be afraid to throw away code that’s not working when the requirements change. You know more about the reguirements now than you did when you first wrote the code.
Entrepreneur has a list of their tweleve most common writing mistakes. These mistakes are targetted to business style writing: You use industry buzzwords that are hackneyed and phony. You assume the reader knows the acronyms or identity of the people you mention. You overuse CAPS and punctuation. You compose overly complicated, overly abstract or flowery writing. You mix single objects with plural pronouns or single subjects with plural verbs. You make one of these common mix-ups.
Brett Terpstra explained how to perform a “safe mode” boot of MacOS. Shut down the computer Hold down the Shift key as you press the power button Keep holding the shift key until after you hear the chime Wait for macOS to boot Shut down and start again without the Shift key Have You Tried Rebooting?
This Chapter is focused on efficient scanning a large table using pagination with offset on the primary key. This is also known as keyset pagination. Efficient pagination of a table with 100M records The key insight is to use the primary key as the offset to avoid missing records (if they’re deleted between invocations) and to increase performance by using a RANGE join type, which is much faster (constant time.
a PWA is a website with special powers. The term “app” in the “Progressive Web App” is not indicative of the sort of content or experience users should expect with a PWA. You shouldn’t get hung up on it; “Progressive Web App” is a marketing term. PWAs have the ability to connect with the operating system (and, thereby, its users) on a deeper level through installation and APIs offering capabilities like notifications, access to the address book, and more.
All we talk about in tech is unicorns, when we should be talking about zebras. Unlike unicorns, zebras are REAL. Zebra companies are black and white — they are profitable and socially conscious. They band together in groups to protect one another. They seek to share resources instead of hoarding them. And they are more concerned about user success than user acquisition. How to launch a company when investors ain’t writing checks
Great news, Rubyists! We recently released google-cloud-gemserver gem, making it possible to deploy a private gem server to Google Cloud Platform (GCP) with a single command Rolling your own private Ruby gem server on Google Cloud Platform
I thought to myself: why is there so little actionable advice out there about negotiation? I suspect it’s because deep down, many people believe that negotiation is inexplicable, that it’s something some people can do and others can’t, and that there’s no real way to break it down so anyone can learn it. Ten Rules for Negotiating a Job Offer How not to bomb your offer negotiation
And if this is the case for some of the simplest human activities, it’s far more true for the most complex ones — writing symphonies and novels, developing new technologies, inventing new scientific paradigms. Geniuses are rarely the best teachers, the best critics, or the best explainers. So it’s rare to come across a genius’s account of “how genius works.” But such accounts do exist, and we were lucky enough to unearth one near the end of our research into the life of Claude Shannon (1916-2001), the intellectual architect of the information age.
It’s happening. Bit by bit, little by little, I’m morphing from an engineer into some kind of…manager. Oh, don’t get me wrong, I still write code every day; but I find myself spending more and more time in analysis and discussion, in meetings and calls, making higher-level decisions, trying to organize teams, and worrying about strategy rather than tactics. Seven things I have learned about writing software
In the past, when venture-funded startups told their investors they’d found a profitable business model, the first thing VC’s would do is to start looking for an “operating exec” — usually an MBA who would act as the designated “adult” and take over the transition from Search to Build. The belief then was that most founders couldn’t acquire the skills rapidly enough to steer the company through this phase. The good news is that VC firms are beginning to appreciate the value of keeping the founder in place.
CAA is a new mechanism that will allow site owners to specify which Certificate Authorities are authorised to issue certificates for their domain name. It’s a simple DNS record so setup is a breeze and SSL Labs is now checking for it, so it’s time to do it! Certificate Authority Authorization
Webfont optimization is a critical piece of the overall performance strategy. Each font is an additional resource, and some fonts may block rendering of the text, but just because the page is using webfonts doesn’t mean that it has to render slower. On the contrary, optimized fonts, combined with a judicious strategy for how they are loaded and applied on the page, can help reduce the total page size and improve page rendering times.
We weren’t the first people to encounter this problem, so we looked at how open source software projects dealt with these situations, and came to the conclusion that adopting the RFC process would help us make better decisions together. 6 Lessons I learned while implementing technical RFCs as a management tool
recently read that TCP BBR has significantly increased throughput and reduced latency for connections on Google’s internal backbone networks and google.com and YouTube Web servers throughput by 4 percent on average globally – and by more than 14 percent in some countries. The TCP BBR patch needs to be applied to the Linux kernel. The first public release of BBR was here, in September 2016. The patch is available to any one to download and install.
Whether there is a security vulnerability or an unlicensed project you could be subjecting yourself or your users to problems. It doesn’t take long to install and run these tools and I encourage you to do so too, they may save you from your dependencies. It takes a little longer, but it’s probably worth it, to add them to your CI setup too. Two tests you should run against your Ruby project now
We all feel unproductive at times, and we can be sure that our bosses, clients, or co-workers feel we are being unproductive at times as well. And, because developer productivity is so hard to measure or talk about, it can feel frustrating to be in a situation where you are feeling or perceived to be unproductive. Rather than dwell on these feelings or postulate new broken ways to measure productivity, I want to talk about the reasons a developer might be unproductive.
Security is one of the most important aspects of a server. Faulty security practices can pave the way for attackers to gain unauthorized access to your server. As a developer you need to take control of your server security – but since servers are messy and managing them is tough, it can be very frustrating. I’ve been there, learned some lessons the hard way, and found success. In this blog post, we will see an overview of basic steps that we can take to enhance the security of our server.
This repository aims to help everyone to write a more idiomatic, clean and tricky ruby code and also try to join a bunch of good refactoring techniques. You can add your own technique or paste it from some website(do not forget the source, of course). All the tricks are in the /tricks folder. Ruby Tricks, Idiomatic Ruby, Refactorings and Best Practices
Auto-play videos suck. They use bandwidth, and their annoying sounds get in the way when you’re listening to music and open a web page. I happen to write for a website that uses them, and it annoys me to no end. (My editors have no control over those auto-play videos, alas.) But you can stop auto-play videos from playing on a Mac. If you use Chrome or Firefox, it’s pretty simple, and the plugins below work both on macOS and Windows; if you use Safari, it’s a bit more complex, but it’s not that hard.
Modern rspec versions (as I’m writing this, the latest version is 3.5.4) have a lot of cool features that are not enabled by default, so as not to break backwards compatibility. What this means is that in practice, unless you turn them on, you’re missing out on a lot of goodies and cool features that could help you spot potential issues in your code and specs. Why You Should Regenerate Your spec_helper
Do you love SSH for the good it has done for mankind, but get annoyed by how long it takes to establish a connection over a high-latency connection? Perhaps you have a process that needs to make thousands of SSH connections, and you’d like a little extra speed from the whole thing. Either way, ControlMaster is your new best friend. SSH ControlMaster: The Good, The Bad, The Ugly
In this article, I’m going to share eight of those items (and the rationale behind them) that we check on when we begin auditing a code base. My aim is to help provide you with a list of things to check on and consider cleaning up as a way to tidy up some possible technical debt and/or oversights. Ruby on Rails Code Audits: 8 Steps to Review Your App
Some useful websites for programmers. When learning CS there are some useful sites you must know to get always informed in order to do your technologies eve and learn new things. Here is a non exhaustive list of some sites you should visit, this list will get updated as soon as I can get another link, but you can also contribute by adding those you know 😉 Best Websites a Programmer Should Visit