background preloader

Typing Practice for Programmers

Typing Practice for Programmers

How to Debug One of the painful parts of teaching a lab-based embedded systems course is that over and over I have to watch a team with a relatively simple bug in their code, but who is trying to fix it by repeatedly making random changes. Generally they start with code that’s pretty close to working and break it worse and worse. By the end of the lab they’re frustrated, aren’t any closer to finding the bug, and have made a complete mess of their code, forcing them to go back to the previous day or week’s version. A typical Computer Science curriculum fails to teach debugging in any serious way. First we’ll want to define some terms: The high-level reason debugging is hard is that it’s an inverse problem: it attempts to infer the cause for observed effects. Of course, a very bad bug will involve several of these factors at the same time. The following steps constitute a fairly complete approach to debugging. 1. It makes no sense to even start debugging unless we’re pretty sure: 2. 3. 4. 5. 6. 7. 8.

Ruby on Rails Guides 7 Unique Ways To Practice Your Coding Skills I am 24 years old and just started learning coding. I want to be a programmer. Am I too late in the game? One of the upvoted answers to this on Quora.com came from graphic artist Michel Poisson. I’m 63, and eight months ago I decided to teach myself Blender 3D. The 40 years between the respondent and the doubter is the chink in our thought process that says it’s a young man’s game. If you have picked up a programming language to learn, let’s start the class with some innovative websites. Dash – Learn With Projects Learn: HTML, CSS, JavaScript Dash is similar to Codecademy with its immersive project-based approach, and the tutorials walk you through five projects of increasing difficulty. Dash is designed for incremental learning – you cannot go to the next skill unless you unlock the previous one. The Code Player – Learn From Screencasts Learn: HTML5, CSS3, JavaScript. Learning with screencasts from coders is another interesting take on how to build something with code. Learn: Python

Netflix Open Sources “Resilience Engineering” Code Library Hystrix: it’s the genus name for “Old World” porcupines, and it’s also the latest release from Netflix. But you won’t see it in their catalog of movie and TV titles, and you can’t add it to your queue, because it’s not content–it’s how Netflix makes sure its content is highly available. Now, Netflix has made Hystrix open source, for anyone using Amazon Web Services (AWS) to implement in their own cloud applications. Read on for details on this “resilience engineering” code library. Mention Netflix, and most people will think of the company’s DVD-rental-by-mail service or its growing library of “Watch Instantly” streaming video titles. This week, Netflix added Hystrix to its bag of open-source tricks. The Hystrix home page on GitHub defines the problem: [R]unning an application that depends on 30 services that each have 99.99% uptime we get: 99.9930 = 99.7% uptime 0.3% of 1 billion requests = 3,000,000 failures 2+ hours downtime/month even if all dependencies have excellent uptime.

railsinstaller.org/en IoC container solves a problem you might not have but it’s a nice problem to have | Krzysztof Koźmic on software On frame­works and libraries A log­ging frame­work helps you log what's hap­pen­ing in your appli­ca­tion. A UI frame­work helps you ren­der and ani­mate UIs to the user. All of these tasks and con­cepts are pretty easy to under­stand. Also the code of your appli­ca­tion changes in order to use those frame­works and libraries. What about IoC container? So what about inver­sion of con­trol con­tain­ers? I got one of the IoC con­tain­ers, put it in my appli­ca­tion, and then all hell broke loose. Let's ignore the details for now and con­cen­trate on the wider sentiment. So? The sen­ti­ment is one of con­fu­sion, scep­ti­cism and frus­tra­tion. Truth is, those aren't nec­es­sar­ily the right ques­tions to ask. I have seen appli­ca­tions where intro­duc­ing a con­tainer imme­di­ately, would only worsen things. What sort of archi­tec­ture are we talk­ing about? Con­tainer has cer­tain require­ments in order to work smoothly. That's a lot of assump­tions, isn't it? It's the inversion! The i-word

VARK: A REVIEW OF THOSE WHO ARE MULTIMODAL Recently my views about those who are multimodal have been extended. Here is my current thinking. Multimodal preferences dominate the database for all populations and it is clearly the most used set of preferences when making decisions about learning. Usually one third of respondents are in the four-part VARK set and another large group are in the groups who have three or two preferred modalities. This dominance can seem disappointing as some people feel that their special characteristics have been lumped into a largely undistinguished category and inappropriately recognized. It also means that teachers, trainers and coaches may be at odds as to how they might help people those people. Context Specific Approach Those who have a multimodal approach to learning and decision-making are now seen in two groups with an indistinct boundary or transition between them. Whole-Sense Approach Some, may criticize them for taking a long time to make a decision. Sequencing

YALV! - Yet Another Log4Net Viewer - Home What's in a Good Commit? - /dev/solita Let's begin with a horror story. You hear that issue FOO-123 has been fixed. The bug had something to do with a subsystem you know well, so you have your own hunch about what might have caused it. To confirm your suspicion, you decide to take a look at how the bug was fixed. Does this sound familiar? 1. If you fix FOO-123 as well as FOO-234, refactor a couple of classes, add a button or two to the UI, and change tabs to spaces throughout the project, all in one commit, it's simply impossible for anyone to review the fix to FOO-123. What if a week later it turns out that your fix caused a new bug that's even worse? The solution is to only make one change in each commit. One of the cool things about distributed version control systems is that if you end up with a working directory full of unrelated changes, you can clean up the mess you've made, but it's better not to make a mess in the first place. This is not just about better commits. 2. 3. 4. 5. Why was the code commented out?

How to get SQL Railroad Diagrams from MSDN BNF syntax notation. – Simple-Talk On SQL Server Books-On-Line, in the Transact-SQL Reference (database Engine), every SQL Statement has its syntax represented in ‘Backus–Naur Form’ notation (BNF) syntax. For a programmer in a hurry, this should be ideal because It is the only quick way to understand and appreciate all the permutations of the syntax. It is a great feature once you get your eye in. There are three problems with the BNF on MSDN. Trigger on an INSERT, UPDATE, or DELETE statement to a table or view (DML Trigger) CREATE TRIGGER [ schema_name . ]trigger_name ON { table | view } [ WITH <dml_trigger_option> [ ,...n ] ] { FOR | AFTER | INSTEAD OF } { [ INSERT ] [ , ] [ UPDATE ] [ , ] [ DELETE ] } [ NOT FOR REPLICATION ] AS { sql_statement [ ; ] [ ,...n ] | EXTERNAL NAME <method specifier [ ; ] > } <dml_trigger_option> ::= [ ENCRYPTION ] [ EXECUTE AS Clause ] <method_specifier> ::= This should, of course, be I’d love to tell Microsoft when I spot errors like this so they can correct them but I can’t. create_trigger:

Testing connectivity to Microsoft SQL Server without any tools installed Often you'll find yourself logged into a web or application server and need to simply test that you can get to the SQL server you've unsuccessfully been trying to point your app at. Luckily there is a nifty trick built into Windows that allows you to save the day without having to install anything on your box – and it works on both client and server operating systems just as well. Why would i ever need this? Your app is having trouble connecting to SQL and you don't know what's wrong. Is something wrong with your app? Is it a network or firewall issue? Is SQL even there…? The "so easy it almost can't be true" solution The guys at Microsoft have baked a SQL Connectivity tool right into Windows with the creation of Microsoft Universal Data Link files (*.UDL) – something designed for another purpose. These were designed as a way to save SQL connection data for use in a whole range of applications and are available on pretty much every version of Windows since *eternity*.

Related: