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
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. 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. 5. 6. 1. 2. 3. 4. 5. Symptoms
Pricing Experiments You Might Not Know, But Can Learn From Lots of entrepreneurs struggle with pricing. How much to charge? It’s clear that the right price can make all the difference – too low and you miss out on profit; too high and you miss out on sales. Don’t ask, can’t tell Asking people what they’d pay for and how much rarely works. For one thing people will tell you what they WANT to pay—which is obviously much less than what your product or service is actually WORTH. When it comes to money, people are unable to predict accurately whether they’d pay or not. Also it’s worth remembering that people really don’t know how much things are worth, what’s a fair price (which is the reason TV-shows like “The Price is Right” can actually exist). William Poundstone, the author Priceless: The Myth of Fair Value says this: “People tend to be clueless about prices. People are weird and irrational, and there’s much we don’t understand. Why does removing dollar signs from prices (24 instead of $24) increase sales? The Economist and decoy pricing Anchoring
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 : "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" . 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. One of the first times I was ever asked about the title of my books was in 1966, during the last previous ACM national meeting held in Southern California. 1. 2.
Scripting Languages I: Node.js, PHP, Python, Ruby (Sheet One) a side-by-side reference sheet sheet one: version | grammar and execution | variables and expressions | arithmetic and logic | strings | regexes | dates and time | arrays | dictionaries | functions | execution control | exceptions | threads sheet two: streams | asynchronous events | files | file formats | directories | processes and environment | option parsing | libraries and namespaces | objects | inheritance and polymorphism | reflection | net and web | gui | databases | unit tests | logging | debugging sheet two: streams | asynchronous events | files | directories | processes and environment | option parsing | libraries and namespaces | objects | inheritance and polymorphism | reflection | net and web | gui | databases | unit tests | logging | debugging version used The versions used for testing code in the reference sheet. show version How to get the version. php: The function phpversion() will return the version number as a string. python: import platform platform.python_version() ruby: <? pad
How I Got 2000+ StumbleUpon Visitors Using My 10 Step Strategy One of the ways of getting initial traffic to a new blog is writing useful comments on relevant posts and discussion forums. The other way is to join social media networks. This article will focus on StumbleUpon and how you can use StumbleUpon to build your personal network, your online profile and initial traffic to your new site. StumbleUpon is one of the leading bookmarking and sharing sites on the web. It is a database of web pages, videos and other online content submitted by users. Following are 10 simple steps you can do today to build your StumbleUpon profile, your personal network and traffic to your website. Register your account at StumbleUpon Create your public profile. Submit your favorites Download the StumbleUpon browser toolbar and start adding your personal bookmarks to the Stumbleupon database. If you are the first one to submit a page, then you will get a box saying that you discovered the website. Make new discoveries daily Be a part of the community. Make friends
do not use debuggers Date: Wed, 6 Sep 2000 12:52:29 -0700 (PDT) From: Linus Torvalds <firstname.lastname@example.org> To: Tigran Aivazian <email@example.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.
Invent Your Own Computer Games with Python - Chapters Chapter 1 Read online: Chapter 1 - Installing Python Videos: Chapter 2 Read online: Chapter 2 - The Interactive Shell Chapter 3 Read online: Chapter 3 - Strings Download source: hello.py Copy source to clipboard: Use the online diff tool to find typos in your code: hello.py Chapter 4 Read online: Chapter 4 - Guess the Number Download source: guess.py Use the online diff tool to find typos in your code: guess.py Chapter 5 Read online: Chapter 5 - Jokes Download source: jokes.py Use the online diff tool to find typos in your code: jokes.py Chapter 6 Read online: Chapter 6 - Dragon Realm Download source: dragon.py Use the online diff tool to find typos in your code: dragon.py Chapter 7 Read online: Chapter 7 - Using the Debugger Chapter 8 Read online: Chapter 8 - Flow Charts Chapter 9 Read online: Chapter 9 - Hangman Download source: hangman.py Use the online diff tool to find typos in your code: hangman.py Chapter 10 Read online: Chapter 10 - Tic Tac Toe Download source: tictactoe.py Chapter 11 Download source: bagels.py
How to Identify Your Online Target Audience and Sell More 66inShareinShare What’s more important, traffic or conversions? If you send me 50k people from a classic tractor repair website and 500 from a prominent marketing site, which one is going to be better for my business? Unless you’re in the pageview business, what you should first and foremost care about is conversions. Conversions take place when targeted traffic meets relevant offer. The aim of marketing is to know and understand the customer so well the product or service fits him and sells itself. - Peter Drucker, influential business thinker of the 20th century If you want to increase conversions, you have to figure out who exactly is your primary target audience, what they want, what matters to them and what are the sources of friction for them. If you say your target audience is “pretty much everybody” or “anyone interested in my services”, you don’t have much of a chance to boost conversions. Why identifying your target audience matters If you know… … and so on and so forth. Image source
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. 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 Stateless does not mean that servers and clients do not have state, it simply means that they do not need to keep track of each other’s state. Uniform interface Interface constraint 1: identification of resources
Good-Tutorials - Newest Tutorials 25 Tech Terms Every Entrepreneur Should Know Credit: Sergey Nivens/Shutterstock Every field has its own "lingo" that goes with the territory. The tech industry is a prime example of this, with dozens of acronyms and complex software terms that may make you feel like you're reading another language. Even if you're not running a tech company, you likely use a lot of technology to help run your business. Knowing common techy terms gives you credibility, broadens your knowledge base and allows you to ask the right questions to get ahead. Server hosting. Other businesses may lease their servers from ISPs and self-maintain them. Data center. Back end. Virtual private network (VPN). Web app. Application programming interface (API). Technology stack. Domain name service (DNS). Open source. Machine learning. Cloud hosting. Software as a Service (SaaS). Content management systems (CMS). Custom software development. ERP software. Business intelligence (BI) software. Contract management software. Performance management software. Engagement.
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. 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?