background preloader

General

Facebook Twitter

Single Responsibility Principle. Hemanth/functional-programming-jargon: Jargon from the functional programming world in simple terms! Rule of Silence definition by The Linux Information Project. The rule of silence, also referred to as the silence is golden rule, is an important part of the Unix philosophy that states that when a program has nothing surprising, interesting or useful to say, it should say nothing. It means that well-behaved programs should treat their users' attention and concentration as being valuable and thus perform their tasks as unobtrusively as possible. That is, silence in itself is a virtue. There is no single, standardized statement of the Unix philosophy, but perhaps the simplest description would be: "Write programs that are small, simple and transparent.

Write them so that they do only one thing, but do it well and can work together with other programs. " That is, the philosophy centers around the concepts of smallness, simplicity, modularity, craftsmanship, transparency, economy, diversity, portability, flexibility and extensibility. The rule of silence is one of the oldest and most persistent design rules of such operating systems. Nick Craver - Stack Overflow: How We Do Deployment - 2016 Edition. This is #3 in a very long series of posts on Stack Overflow’s architecture. Previous post (#2): Stack Overflow: The Hardware - 2016 Edition We’ve talked about Stack Overflow’s architecture and the hardware behind it. The next most requested topic was Deployment. How do we get code a developer (or some random stranger) writes into production? I’m going ahead and inserting a set of section links here because this post got a bit long with all of the bits that need an explanation: Source This is our starting point for this article.

A Little Context We deploy roughly 25 times per day to development (our CI build) just for Stack Overflow Q&A. The Human Steps When we’re coding, if a database migration is involved then we have some extra steps. And here’s the local %Repo%\StackOverflow.Migrations\ folder: You can see both in chat and locally that 726 was the last migration number taken. Now let’s add some code — we’ll keep it simple here: A \StackOverflow\Models\User.cs diff: .. So far, so good. Tiers. 20 lines of code that will beat A/B testing every time. Zwibbler.com is a drop-in solution that lets users draw on your web site. A/B testing is used far too often, for something that performs so badly. It is defective by design: Segment users into two groups. Show the A group the old, tried and true stuff. Show the B group the new whiz-bang design with the bigger buttons and slightly different copy.

After a while, take a look at the stats and figure out which group presses the button more often. In recent years, hundreds of the brightest minds of modern civilization have been hard at work not curing cancer. With a simple 20-line change to how A/B testing works, that you can implement today, you can always do better than A/B testing -- sometimes, two or three times better. It can reasonably handle more than two options at once.. The Multi-armed bandit problem The multi-armed bandit problem takes its terminology from a casino. Like many techniques in machine learning, the simplest strategy is hard to beat. Why does this work? More blog entries. How do you review code? I'm hoping to find ways to improve the code review process at the company where I work. My team has a fairly has a fairly standard github PR-based process.

When you have some code you want to merge into the master branch you open a PR, ask another developer or two to review it, address any comments they have, and then wait for one of the reviewers to give it an LGTM (looks good to me). The problem is that there can be a lot of lag between asking someone to review the PR and them actually doing it, or between addressing comments and them taking another look. Worst of all, you never really know how long things will take, so it's hard to know whether you should switch gears for the rest of the day or not.

Over time we've gotten used to communicating a lot, and being shameless about pestering people who are less communicative. So, has anyone else run I to similar problems? The Power of Ten -- Rules for Writing Safety Critical Code. Dad and The Ten Commandments of Egoless Programming - Stephen Wyatt Bush's Blog. Dad and I got to talk about programming for two weeks before he died. I was 22, a senior in college completing a BFA in graphic design. Dad was 62, an older dad than most. When he started programming at Tennessee Tech back in the 60s, he wrote FORTRAN on punch cards. He was a wealth of knowledge. I had just been introduced to code that semester, and it was already consuming my thoughts. When I came home for the holidays, Dad shared The Ten Commandments of Egoless Programming with me. From The Psychology of Computer Programming, written in 1971, here are The Ten Commandments of Egoless Programming: Understand and accept that you will make mistakes. I keep this list around even today.

For more on Dad, read Frank Bush’s Contributions to the Computing Profession, compiled by his coworkers at TTU. How to Stop Over-Analyzing Every Conversation. Pick Your Battles « I am Zef. So, you decided to build a real application. Not a toy. Not a hobby project. Something that’s supposed to last, supposed to scale, supposed to work and remain reliable. If you’re in any way like me, I bet right now you’re browsing the interwebs like crazy to find the hottest new technology you get your hands on to use in this new venture.

This is a once in a lifetime opportunity! This is what Cloud9 did. Here’s some of the things we ran into: “Oh, how do we organize a big (200k+ lines of code) JavaScript code base?” All of these are technically interesting problems. Are any of these problems unsolvable? The approach taken for a large part of our infrastructure is to adopt every piece of code used as our own, and make sure the team can debug issues and fix problems at every level of the stack (at least all the “new” tech). What I learned is that you have to figure out how many simultaneous challenges you’d like to handle. If it’s new technology for the sake of new technology, think twice. Extreme Programming Rules. Planning User stories are written.

Release planning creates the release schedule. Make frequent small releases. The project is divided into iterations. Iteration planning starts each iteration. Managing Give the team a dedicated open work space. Set a sustainable pace. A stand up meeting starts each day. The Project Velocity is measured. Move people around. Fix XP when it breaks. Designing Simplicity. Choose a system metaphor. Use CRC cards for design sessions. Create spike solutions to reduce risk. No functionality is added early. Refactor whenever and wherever possible. Signs that you're a bad programmer - Software Engineering Tips. Why was this written? Most of these faults were discovered the hard way by the author himself, either because he committed them himself or saw them in the work of others. This paper is not meant for grading programmers, it was intended to be read by programmers who trust their ability to judge when something is a sign of bad practice, and when it's a consequence of special circumstances.

This paper was written to force its author to think, and published because he thinks you lot would probably get a kick out of it, too. 1. Inability to reason about code Reasoning about code means being able to follow the execution path ("running the program in your head") while knowing what the goal of the code is. Symptoms Remedies To get over this deficiency a programmer can practice by using the IDE's own debugger as an aide, if it has the ability to step through the code one line at a time. 2. Object Oriented Programming is an example of a language model, as is Functional or Declarative programming. 3. 4. How to be a Programmer: A Short, Comprehensive, and Personal Summary. Debugging is the cornerstone of being a programmer.

The first meaning of the verb to debug is to remove errors, but the meaning that really matters is to see into the execution of a program by examining it. A programmer that cannot debug effectively is blind. Idealists that think design, or analysis, or complexity theory, or whatnot, are more fundamental are not working programmers. The working programmer does not live in an ideal world. Even if you are perfect, your are surrounded by and must interact with code written by major software companies, organizations like GNU, and your colleagues.

Most of this code is imperfect and imperfectly documented. Debugging is about the running of programs, not programs themselves. To get visibility into the execution of a program you must be able to execute the code and observe something about it. The common ways of looking into the ‘innards’ of an executing program can be categorized as: How to Debug by Splitting the Problem Space. Bad code isn’t Technical Debt, it’s an unhedged Call Option – Steve Freeman. I’d been meaning to write this up for a while, and now Nat Pryce has written up the 140 character version. This is all Chris Matts‘ idea. He realised that the problem with the “Technical Debt” metaphor is that for managers debt can be a good thing. Executives can be required to take on more debt because it makes the finances work better, it might even be encouraged by tax breaks. This is not the same debt as your personal credit card.

I “write” a Call Option when I sell someone the right, but not the obligation, to buy in the future an agreed quantity of something at an price that is fixed now. From my side, if the price of the santas stays low, I get to keep your payment and I’m ahead. Call options are a better model than debt for cruddy code (without tests) because they capture the unpredictability of what we do. On the other hand, if a radical new feature comes in that I have to do, all those quick fixes suddenly become very expensive to work with. Do not use debuggers. Date: Wed, 6 Sep 2000 12:52:29 -0700 (PDT) From: Linus Torvalds <torvalds@transmeta.com> To: Tigran Aivazian <tigran@veritas.com> Subject: Re: Availability of kdb On Wed, 6 Sep 2000, Tigran Aivazian wrote: > > very nice monologue, thanks. It would be great to know Linus' opinion. I> mean, I knew Linus' opinion of some years' ago but perhaps it changed? He> is a living being and not some set of rules written in stone so perhaps> current stability/highquality of kdb suggests to Linus that it may be> (just maybe) acceptable into official tree?

I don't like debuggers. Never have, probably never will. I use gdb all the time, but I tend to use it not as a debugger, but as a disassembler on steroids that you can program. None of the arguments for a kernel debugger has touched me in the least. Knuth: Computer Programming as an Art. CACM, December 1974 When Communications of the ACM began publication in 1959, the members of ACM'S Editorial Board made the following remark as they described the purposes of ACM'S periodicals [2]: "If computer programming is to become an important part of computer research and development, a transition of programming from an art to a disciplined science must be effected.

" Such a goal has been a continually recurring theme during the ensuing years; for example, we read in 1970 of the "first steps toward transforming the art of programming into a science" [26]. Meanwhile we have actually succeeded in making our discipline a science, and in a remarkably simple way: merely by deciding to call it "computer science. " Implicit in these remarks is the notion that there is something undesirable about an area of human activity that is classified as an "art"; it has to be a Science before it has any real stature.

In this talk I shall try to explain why I think "Art" is the appropriate word. Summary. The Wrong Abstraction — Sandi Metz. I originally wrote the following for my Chainline Newsletter, but I continue to get tweets about this idea, so I'm re-publishing the article here on my blog. This version has been lightly edited. I've been thinking about the consequences of the "wrong abstraction. " My RailsConf 2014 "all the little things" talk included a section where I asserted: duplication is far cheaper than the wrong abstraction And in the summary, I went on to advise: prefer duplication over the wrong abstraction This small section of a much bigger talk invoked a surprisingly strong reaction.

The strength of the reaction made me realize just how widespread and intractable the "wrong abstraction" problem is. Programmer A sees duplication.Programmer A extracts duplication and gves it a name. Existing code exerts a powerful influence. When you appear in this story in step 8 above, this pressure may compel you to proceed forward, that is, to implement the new requirement by changing the existing code. News: 99Bottles Book. What RESTful actually means. If you do web development, you’ve probably heard of REST. But if you’re like me, you usually just pretend to know what it is, and nod politely when someone asks you if what you’re making is RESTful. I use HTTP, err, that means it’s RESTful right? Recently, I decided to take the plunge and actually find out what this peaceful-sounding buzzword means.

What is REST? REST stands for Representational State Transfer. It is a set of design principles for making network communication more scalable and flexible. Roy T. The Fielding Constraints Fielding’s dissertation outlines a number of architectural constraints that a system must satisfy to be considered RESTful. Client-server The first Fielding Constraint specifies that the network must be made up of clients and servers.

A non-RESTful alternative to client-server architecture is event-based integration architecture. Stateless Uniform interface Interface constraint 1: identification of resources Let’s think about the case of a blog on the Web. Make This In An Hour. The UNIX School: awk - 10 examples to split a file into multiple files. In this article of the awk series, we will see the different scenarios in which we need to split a file into multiple files using awk. The files can be split into multiple files either based on a condition, or based on a pattern or because the file is big and hence needs to split into smaller files.

Sample File1: Let us consider a sample file with the following contents: $ cat file1 Item1,200 Item2,500 Item3,900 Item2,800 Item1,600 1. Split the file into 3 different files, one for each item. i.e, All records pertaining to Item1 into a file, records of Item2 into another, etc. $ awk -F, '{print > $1}' file1 The files generated by the above command are as below: $ cat Item1 Item1,200 Item1,600 $ cat Item3 Item3,900 $ cat Item2 Item2,500 Item2,800 This looks so simple, right? 2. . $ awk -F, '{print > $1".txt"}' file1 The only change here from the above is concatenating the string ".txt" to the $1 which is the first field. . $ ls *.txt Item2.txt Item1.txt Item3.txt 3. . $ cat Item1.txt 200 600 4. 5. 6. 7. jQquerysummit - Large-scale JavaScript Application Architecture.

Erlang and code style. "Il faut s'appuyer sur les développeurs pour réinventer la France", selon Tariq Krim. OS X Lion – Terminal Colours | DerekGourlay.com. Technique informatique. The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) Scalability. Become a Programmer, Motherfucker.

Fundamentals. Recommended Reading | The Homepage of @attrc. Happy Codings - Programming Sample Code Source Code Search Engine, Example Codes. Peter Norvig. Mastering-emacs-in-one-year-guide/guide-en.org at master · redguardtoo/mastering-emacs-in-one-year-guide.