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*. 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. It isn’t the only way to get the information; You can, of course, reverse-engineer an understanding of the syntax from the examples, but your understanding won’t be complete, and you’ll have wasted time doing it. BNF is a good start in representing the syntax: Oracle and SQLite go one step further, and have proper railroad diagrams for their syntax, which is a far more accessible way of doing it.
There are three problems with the BNF on MSDN. 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. Gunter’s Railroad Diagram Generator is brilliant. Create_trigger: 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. You spend quite some time rummaging through the revision history until you manage to narrow the fix down to four consecutive revisions, described in their commit messages as "dao tweaks", "moar", "Fixes. " and "remove debug stuff".
Each changeset looks huge. There are hundreds of lines of changes spread over a dozen of files. 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? This is not just about better commits. 2. 3. 4. 5. YALV! - Yet Another Log4Net Viewer - Home. 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. I’m not talking about teaching students to use debugging tools. Rather, we fail to teach the thing that’s actually important: how to think about debugging. Part of the problem is that most CS programming assignments are small, self-contained, and not really very difficult. First we’ll want to define some terms: Of course, a very bad bug will involve several of these factors at the same time. 1. 2. 3. 4. 5.
Typing Practice for Programmers | typing.io. Regexper. Regular Expressions 101. 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. But Netflix has developed internal infrastructure to supplement the AWS cloud, on which many Netflix services run, and has started releasing some of that code under open source licenses for any developer to use. This week, Netflix added Hystrix to its bag of open-source tricks. The Hystrix home page on GitHub defines the problem: Reality is generally worse. IoC container solves a problem you might not have but it’s a nice problem to have | Krzysztof Koźmic on software. On frameworks and libraries A logging framework helps you log what's happening in your application. A UI framework helps you render and animate UIs to the user. A communication library helps connecting parts of a distributed system.
All of these tasks and concepts are pretty easy to understand. They are quite down to earth, and therefore, at a high level at least, easy to explain. Also the code of your application changes in order to use those frameworks and libraries. What about IoC container? So what about inversion of control containers? I got one of the IoC containers, put it in my application, and then all hell broke loose. Let's ignore the details for now and concentrate on the wider sentiment. So? The sentiment is one of confusion, scepticism and frustration. Truth is, those aren't necessarily the right questions to ask. I have seen applications where introducing a container immediately, would only worsen things. What isn't there… 10Algorithms-08.pdf (application/pdf Object)
How Not To Sort By Average Rating. By Evan Miller February 6, 2009 (Changes) Translations: Russian Ukrainian Estonian PROBLEM: You are a web programmer. You have users. Your users rate stuff on your site. You want to put the highest-rated stuff at the top and lowest-rated at the bottom. WRONG SOLUTION #1: Score = (Positive ratings) − (Negative ratings) Why it is wrong: Suppose one item has 600 positive ratings and 400 negative ratings: 60% positive. Sites that make this mistake: Urban Dictionary WRONG SOLUTION #2: Score = Average rating = (Positive ratings) / (Total ratings) Why it is wrong: Average rating works fine if you always have a ton of ratings, but suppose item 1 has 2 positive ratings and 0 negative ratings. Sites that make this mistake: Amazon.com CORRECT SOLUTION: Score = Lower bound of Wilson score confidence interval for a Bernoulli parameter Say what: We need to balance the proportion of positive ratings with the uncertainty of a small number of observations.
UPDATE, March 2016: Here’s the same formula in Excel: 14 Ways to Contribute to Open Source without Being a Programming Genius or a Rock Star. Normal Stuff - How to make your shopping cart suck less. Normal Stuff - Ovid at blogs.perl.org: What to know before debating type systems. Originally located at this article explained some basic concepts of type systems. Unfortunately, that page is gone and I had to fetch it from the web archive of that page. The note at the bottom states that contents are in the public domain, so I think it's OK to reproduce here. What follows is a short, brilliant introduction to the basic concepts of type systems, by Chris Smith. What To Know Before Debating Type Systems I would be willing to place a bet that most computer programmers have, on multiple occasions, expressed an opinion about the desirability of certain kinds of type systems in programming languages. There are a few common misconceptions, though, that confuse these discussions.
Classifying Type Systems Type systems are commonly classified by several words, of which the most common are "static," "dynamic," "strong," and "weak. " Strong and Weak Typing Probably the most common way type systems are classified is "strong" or "weak. " Why?
Normal Stuff - Personal names around the world. Background People who create web forms, databases, or ontologies are often unaware how different people’s names can be in other countries. They build their forms or databases in a way that assumes too much on the part of foreign users. This article will first introduce you to some of the different styles used for personal names, and then some of the possible implications for handling those on the Web. This article doesn't provide all the answers – the best answer will vary according to the needs of the application, and in most cases, it may be difficult to find a 'perfect' solution.
Scenarios There are a couple of key scenarios to consider. You are designing a form in a single language (let’s assume English) that people from around the world will be filling in. In reality, you will probably not be able to localize for every different culture, so even if you rely on approach 2, some people will still use a form that is not intended specifically for their culture.
Examples of differences . Normal Stuff - api-design.pdf (application/pdf Object) Normal Stuff - API Design Principles. English Русском One of Qt’s most reputed merits is its consistent, easy-to-learn, powerful API. This document tries to summarize the know-how we’ve accumulated on designing Qt-style APIs. Many of the guidelines are universal; others are more conventional, and we follow them primarily for consistency with existing APIs. Although these guidelines are aimed primarily at public APIs, you are encouraged to use the same techniques when designing internal APIs, as a courtesy to your fellow developers. You may also be interested to read Jasmin Blanchette’s Little Manual of API Design [.in.tum.de] or its predecessor Designing Qt-Style C++ APIs [doc.qt.digia.com] by Matthias Ettrich. Six Characteristics of Good APIs An API is to the programmer what a GUI is to the end-user. Be minimal A minimal API is one that has as few public members per class and as few classes as possible.
Be complete A complete API means the expected functionality should be there. Have clear and simple semantics Be intuitive Good Bad. The Principles of Good Programming. Heron-Centric: Ruminations of a Language DesignerThe Principles of Good Programmingby Christopher DigginsJuly 24, 2011 Today's post is a lightly edited repost from my blog at The Area, a web-site dedicated to users of Autodesk media and entertainment products.
I came up with this list of principles to help with a recent C# training I gave, and I thought that members of the Artima.com community could appreciate these principles and have some interesting insights to share. The principles of good programming are closely related to principles of good design and engineering. The following programming principles have helped me over the years become a better programmer, and I believe can help any developer become more efficient and to produce code which is easier to maintain and that has fewer defects. DRY - Don’t repeat yourself - This is probably the single most fundamental tenet in programming is to avoid repetition.
KISS (Keep it simple, stupid!) Semantic Versioning. How do you handle your Project Manager - Programmers - Stack Exchange. Application structure: Concepts & Features. I spoke about this topic quite a bit in ALT.Net Seattle. This is mostly relating to application architecture and how you structure your application. This is the logical result of applying the Open Closed and Single Responsibility Principles. Feature may not be as overloaded a term in our industry as a service, but it still important to define exactly what I mean.
A feature, in my eyes, is a discrete part of the application that perform some operation. That is pretty vague, I know, but I hope that the examples I am going to go through later would make it clearer. So far, it is pretty much the standard fare, but I have a few rules about a feature, the most important of them is: A feature creation may not involve any design activity. That is probably something that would raise a few eyebrows, but the idea is very simple.
Let us take NH Prof as a good example. Session & statements Stack trace Loaded entities Reports Alerts Filtering That is it. As for features? That is almost it. You are NOT a Software Engineer! - chrisaitchison.com. You are not a Software Engineer. You do not build skyscrapers. You do not build bridges. You grow gardens. You are a Software Gardener. Do you try to plan your gardens in such detail that you know where each leaf will be positioned before you plant a single seed? Do people expect estimates (or are they promises in your organisation?) You probably have a good idea of what your garden should look like a week into the future. If you were building a bridge or a skyscraper and you told me, before you began, that you knew exactly how it would look when it was finished – I would believe you. So why do so many gardens fail, yet so many skyscrapers succeed? Remember that time when someone in your company unsuccessfully used an Agile gardening methodology, and then went around saying that it was horse shit that doesn’t work?
Unlike a skyscraper, your garden will grow weeds. In most countries, Engineers need a license to build a bridge. I am a Software Gardener. So are you.
The Usability of Passwords (by @baekdal) #tips. Security companies and IT people constantly tells us that we should use complex and difficult passwords. This is bad advice, because you can actually make usable, easy to remember and highly secure passwords. In fact, usable passwords are often far better than complex ones. So let's dive into the world of passwords, and look at what makes a password secure in practical terms. Update: Read the FAQ (updated January 2011) Update - April 21, 2011: This article was "featured" on Security Now, here is my reply!
How to hack a password The work involved in hacking passwords is very simple. Asking: Amazingly the most common way to gain access to someone's password is simply to ask for it (often in relation with something else). When is a password secure? You cannot protect against "asking" and "guessing", but you can protect yourself from the other forms of attacks. The measure of security must then be "how many password requests can the automated program make - e.g. per second". Like these: It takes:
Subversion. Hg Init: a Mercurial tutorial by Joel Spolsky. .NET. Web. T-SQL and SQL Server Related.