January 8, 2015 Leave a comment
October 7, 2014 Leave a comment
Are you looking to get ahead in your job? Have you always wondered what is possible with computer programming and software development? Maybe your boss has assigned you a technical programming task that has you confused about where to start. Begin the path to improving your technical skills and reaching your goals by attending our upcoming seminar.
If you are reading this, you have probably always been interested in computer programming but have never had someone introduce the technology to you. Do not worry about diving in over your head. We will adapt the course content to those who attend and will be available after class to answer any questions.
By attending, you will see simple examples of how to display information from a database on a web page. If time permits, we will demonstrate how to manipulate that data or automate a task.
With a little curiosity and motivation, you’ll be accomplishing more than you thought possible.
November 1, 2013 Leave a comment
As I’ve written before, I often think about which American cities are the best hosts for software developers. I’ve stumbled upon another metric contributing to the conversation: Number of Developers with Stack Overflow Careers accounts.
It seems to me that developers with accounts on Stack Overflow tend to be more enlightened than those who do not. If we assume that a representative number of those developers have “Careers” accounts, then we can easily compute a ratio of enlightened developers in a city.
- To query the number of developers in a city, navigate to:
- Simply type in the city name and click “Search”.
- You’ll see a nice map representation with the number of “Careers” accounts in the area (I used a radius of 50 miles)
The nice thing about this approach is it is simple and currently free. I’ve been experimenting with this search page since 2009, back when no city in Ohio had more than 9 members. It’s nice to see such growth in the site.
To instead get more accurate data, the StackExchange API could be used to compile the locations of every Stack Overflow user. The locations could then be parsed and plotted on a map with additional processing to query how many are within a certain distance. Actually, that sounds interesting. I think I’ll have to do that soon!
Keeping with the consistency of my blog, let’s take a look at the cities in the Midwest with the highest numbers of developers with Stack Overflow Careers accounts. You can contrast the below numbers with a large city, like San Francisco, CA, which has 3500.
How Should the Midwest be Defined?
Allow me for a moment to rant about what I consider the “Midwest.” Many people who live outside the Midwest maintain too broad a definition of the Midwest. Omaha and Minneapolis are not Midwestern cities. They reside in the Great Plains. Louisville & Nashville are not Midwestern cities. They are in the South. There is a certain culture embodied by a Midwestern city that excludes those previously mentioned. Midwestern cities are not major metropolises nor are they merely farm country. They reside somewhere in between, as medium-sized cities, and are typically within a short drive of another city falling in the same category. Refer to my hand-drawn map of the Midwest.
An ideal map of the Midwest can split state borders. It should seem clear why northern Wisconsin & Michigan are not included. They are so far North that the culture is different enough not to be representative. Culturally, the cities I choose to include are similar. They tend to have cold winters, their people speak with only slight accents, and they all have an inferiority complex with Chicago. Lastly, every city is within a 3 hour drive to a Top 100 US city in population. This last point is what disqualifies Minneapolis, which is a significant drive to Madison.
October 13, 2013 Leave a comment
Too much of the literature about the Entity Framework contains directions for mapping directly to Stored Procedures. The way it is presented, it seems easy enough. However, attempting to implement this strategy beyond a simple example quickly becomes unnecessarily difficult.
Let’s say you would like to implement a Model First pattern whereby all the entities’ create, update, and delete (CUD) methods were mapped to Stored Procedures. For cases where the database already exists or where using Stored Procedures is a predetermined constraint of the project, this pattern enables your .NET code to mimic typical LINQ to Entities code. Ideally, the mappings would be mostly abstracted away into the Entity Framework definition file. Once mapped, developers would not have to pay much attention to this implementation detail.
Unfortunately, there’s a vast difference between what you can do with the Entity Framework in a simplified demonstration and the restrictions meeting you in practice. Below is a guide that covers the pros, cons, and restrictions of the “EF-to-STP” approach.
There are some advantages to using Stored Procedures. Mapping them in Entity Framework potentially produces the best features of both technologies.
When a database already exists that has implemented a great deal of logic in Stored Procedures, it can be reused.
Stored Procedures form a layer “underneath” the .NET code. Behind this abstraction layer, .NET developers do not need to understand implementation details.
Every Stored Procedure can have user-specific permissions.
Business logic implementation can be performed by a database developer whose skillset is strong in Stored Procedures.
Pluralsight.com has several video resources with tips about implementing the Entity Framework with Stored Procedures, including these three which I found helpful:
- Entity Framework 4.0 By Example
- Designer Supported EDM Customization
- Getting Started with Entity Framework 5
Below are some of the limitations mentioned in the videos:
All CUD Stored Procedures must be mapped for an Entity
For each entity, if any of the Create, Update, or Delete functions is mapped, then all 3 should be. For example, if you only map the Delete function to a Stored Procedure but at runtime your .NET code causes an Update to occur on that entity, it will throw an exception. It will not use the default Entity Framework functionality for the Update call.
Parameters can be mapped only to entity properties
You cannot map the parameters to a scalar value or a function. For example, you cannot map a Date parameter to DateTime.Now.
Stored Procedures that return entities have change tracking by default
In contrast, Stored Procedures that return complex objects do not support change tracking.
Insert Procedures must return SCOPE_IDENTITY
In the last line of your Insert Stored Procedures, include the line “Select SCOPE_IDENTITY() as ID” so that Entity Framework can push the newly generated record ID back into memory.
No support for multiple result sets
Limitations Found Through Experience
The biggest issue with using EF-to-STPs is that the developer of the Stored Procedures probably did not realize the database would be consumed this way. To do it right, a great deal of consistency is needed. There must be 1 Stored Procedure for Insert, 1 for Updates, and 1 for Deletes per entity. The Stored Procedure developer may have optimized for different things, such as readability or a reduction in round-trips to the database, instead of for a standard pattern that can be used by a high-level Framework. The below tips can be helpful as a guide to developing Stored Procedures if they are not yet finished.
Do Not rely on default parameters
You must specify exactly 1 parameter per entity column for select queries. Similarly, for an update query, every column must have a parameter in the Stored Procedure, and you must map every parameter in the Entity Data Model. Therefore, Default parameters have almost zero purpose for CUD Stored Procedures in our scenario.
Do Not rely on output parameters
Output parameters in Stored Procedures used for CUD cannot be mapped in the Entity Data Model.
Do Not rely on custom or table parameters
The Entity Framework can consume Stored Procedures that have table parameters. However, they require more of an ad hoc coding structure. They do not fit well into our EF-to-STPs pattern.
No ability to include referenced tables
The Entity Framework can utilize Function Imports to return entities from Select Stored Procedures. However, the ability to include reference tables is not built-in.
Extra Stored Procedure logic can fool Entity Framework
Scenario: An Update Stored Procedure performs additional logic to update another table before updating the mapped entity’s table.
Outcome: The Entity Framework got confused by how many records were updated and rolled-back the update.
Ensure returned data types are consistent
Scenario: A Select Stored Procedure uses IF statements and CASE statements to determine what Select query to use. Reading through the code, it’s difficult to detect, but one path returns Integers while another returns Bits.
Outcome: The Entity Framework generates metadata using one path and throws a cast exception at runtime.
Proceed with Caution
The Entity Framework is a great tool, especially when it is used with LINQ queries to the database. While Microsoft and its partners describe how to map the Entity Framework to Stored Procedures, it only works in simple cases or where the Stored Procedure developer follows very strict standards. In most cases, it is not practical.
Still, the Entity Framework can very well be used to query Stored Procedures with a more verbose approach. It requires more code than EF-to-STP mapping described above. However, it typically requires less code than reverting to older technologies like ADO.NET. Just stay away from the mapping.
Disclaimer: Most of my experience in this area is with Entity Framework Version 4, but I believe it applies to Version 5 as well.
September 1, 2013 Leave a comment
3 Years ago, I wrote a blog post titled “I Heart Karnaugh Maps.” In it, I described a technique that can be used to reduce the complexity of Boolean expressions. I provided sample diagrams as I worked through the technique step by step. In one of them, I added an alt tag of “Blank Karnaugh Map” to describe the starting point of the whole process. Little did I know that defining such a targeted search keyword would alter my perspective about Internet search traffic.
Blank Karnaugh Maps
That blog post has always ranked in the top 20% of all my posts in terms of page views, largely due to the one keyword.
Among my blog’s highest ranking keywords are:
4th “Blank Karnaugh Map”
9th “Karnaugh Map”
12th “Blank Karnaugh Maps”
I first learned about Karnaugh Maps as a programming tool in my undergraduate studies at The Ohio State University. In Math 366: “Discrete Mathematics with Applications” I learned:
- Mathematical formalization and reasoning, logic, and Boolean algebra
- Sets, functions, relations, recursive definitions, and mathematical induction
- Elementary counting principles
In order to refresh my knowledge before my blog post, I read an Electronics book. In neither the book nor the course do I remember a specific need for blank karnaugh maps or images of blank karnaugh maps. Therefore, as time passed, I was lead to wonder, why do so many people need blank karnaugh maps?
Has an Opportunity Presented Itself?
I had a few conversations with fellow software developers who were intrigued by my Karnaugh Map post. Apparently, Karnaugh Maps were drawing more interest than I expected and my site was getting found by people looking to know more about them. I decided to brainstorm ways I could leverage this interest into a software product I could sell. I figured people were already coming to my blog to find information about Karnaugh Maps and software development tips. Wouldn’t a product that uses this technology to improve code be useful to my readers? I decided to call it Logic Reducer.
By no means am I a good Internet marketer. However, I had recently signed up for the Micropreneur Academy and was learning the value of performing market research before beginning product development. I wanted to make sure that I could plausibly make a profit based on the number of potential users and competition. I used three high-level approaches in my research.
Quantity of Internet Searches
There are various methods to research how many people are looking for a particular topic online. I used Micro Niche Finder to determine that “Karnaugh Maps” was being searched about 1,600 times per month. While this is not a lot, I was encouraged by the quantity of searches of some of the longer-tail keywords and the relative ease with which my website could potentially rank for them.
In order to gauge the number of potential users for my product, I researched U.S. employment data. I estimated there were about 800,000 computer engineers and 200,000 hardware engineers in the United States. These numbers were very encouraging.
Using Google, I found several applications on the Web that had the features I wanted to build. Many of them were free. However, in reading related forums, it seemed like they often failed because they froze up or had a very limited feature set. Additionally, I did not find any on the Internet that were newer than 2006. Most of the applications were downloadable, thick clients. They were lacking the advantages of being Web products.
Karnaugh Map Minimizer on SourceForce gets .5K hits/day
Logic Minimizer 1.2.1
Karnaugh Map – minimalization software
In 2010, smart phone app stores appeared to still be growing rapidly. I was leaning toward making an iPhone app that could be used as a companion to someone writing software on a personal computer. I found a few apps that already existed:
Karnaugh Map Optimizer $.99
Logic Shrinker –Free-
While a few cheap apps already existed, I liked that there were not yet any iPad apps. Also, one review of an app stated that if Boolean Simplification (a feature I planned to develop) were included, he would pay 7 or 8 dollars for the app. My findings did not deter me from moving forward to the next step.
How far Did I Go?
I liked that there were potentially many users of my idea. However, there were already very affordable ways to accomplish what I was considering my main value proposal. Therefore, I moved forward cautiously. I was optimistic, so I secured the domain name LogicReducer.com. However, I was concerned that there wasn’t enough market interest so I looked for validation of my idea.
I wanted to have a designer mockup my ideas so I could more clearly describe them. I got a quote from an offshore design agency for 4 screen mockups and 1 logo. It was going to cost $500.
I asked more people about what they thought regarding my idea. The general response was that people were intrigued by the product being a Boolean logic reducer. However, I also posted to the forums in the Micropreneur Academy and multiple people voiced some warnings. They felt it catered to too small of a niche, that I would not be able to gain enough revenue to make the project worthwhile.
I decided to stop working toward building Logic Reducer at that point. I was scared by the surprisingly high $500 investment for mockups and the concerns about the niche.
What Will I Do Next Time?
All in all, I did not spend very much time or money determining if Logic Reducer would be a good product to build, especially when compared to the time it would have taken to complete it and watch it fail. My blog content had exposed a tiny sliver of opportunity on the Internet. I researched that sliver and determined that I couldn’t make enough money from it for it to be worth my time.
However, I still think this is a good strategy for finding business ideas. Bloggers and content producers who have the ability to use analytics to see what topics are of interest to readers can use that knowledge to find problems in the world. Were I to find another surprisingly popular search keyword, I would research related business opportunities similar to how I did it before.
July 19, 2013 Leave a comment
As part of Toastmasters, I recently gave a speech out of The Entertaining Speaker – Advanced Communication Series.
Project 1 – “The Entertaining Speech”
Duration: 5-7 Minutes
- Entertaining the audience by relating a personal experience
- Organize an entertaining speech for maximum impact
June 11, 2013 3 Comments
Over the past year, I’ve been working exclusively on a reasonably-priced standing desk. Originally, I thought I wanted to splurge on an adjustable height desk, but I wasn’t sure how much I would actually use the standing capability. Therefore, I did some research and found a very easy-to-assemble, albeit not advertised, configuration of Ikea desk parts.
You can reference the Vika Buying Guide here.
I bought the Vika Amon (now called Linnmon) table top ($48), which is a nice big platform for my keyboard, mouse, and some extra workspace.
The default legs that are used with this table top are called Vika Adils. They are cheaply priced at $3.50/each, but they are for a shorter table configuration. They are not adjustable and are only 27 1/2″ tall.
Instead, to create a tall standing desk, I used a different type of leg from Ikea, the Vika Byske ($30/each). Vika Byske legs are adjustable up to 42 1/8″ and are supposed to go with the Gerton/Vika Byske table. However, the configuration I used still worked. They screwed into the bottom of the Vika Amon table just like the other legs.
The desk works perfectly for me and I recommend this setup. Including the platform of the table top, the height of the desk is 44″, which is right at the height of my elbows bent at 90 degrees hanging down at my sides.
When I don’t want to stand
There are times when I get too tired to stand, so I needed a large stool ($60) I could sit in and still be high enough to comfortably reach the keyboard. Now that I know that I like this setup, I would like to upgrade the stool situation. However, it’s difficult to find such a tall stool for under $200.
I bought a shelf to raise my monitor from the desktop. I cannot find it online at Ikea.com, but it was on display in the store. It raises the monitor about 12″.
Another useful item is my iPhone stand. I use it to connect power my iPhone and situate it as a 3rd monitor. The screen stays on as I sometimes use it to display a stock ticker, time tracker, or reference videos.
44″ high desk
33″ high chair
1 Table – $48
5 Legs – $150
1 Monitor Shelf – $30
1 Barstool – $60
Total for a standing desk solution: ~$290
I love my desk setup but there are a couple drawbacks involved.
- The taller the legs go, the less stable the desk is. I feel as though I’ve extended the adjustable legs to their maximum length. At this height, the desk does wobble a bit but I’ve been using it over a year and have never had anything fall off. I would be much more concerned though if, say, a toddler were around the desk and was trying to shake the legs, because the toddler may cause something to fall off.
- Cables are difficult to hide, since this desk is simply a table top and legs. Also, since it’s so tall, many people can see the unsightly mess stored underneath it. Therefore, to maintain a consistent look, you almost need to purchase a matching cable concealer and file cabinet on which to place the computer.
Still, I recommend trying out a standing desk to see if you like it. Remember, it can be done for the small financial commitment of under $300.
April 18, 2013 1 Comment
Posted by A is for Angie
My wife and I have started to use a term we’ve developed called “Umbrella Theory.” It’s almost a synonym of “Reverse Jinx,” but there’s more to it than that.
The Reverse Jinx
By my definition, to jinx means to “foredoom to failure or misfortune by mentioning the possibility of an unlikely catastrophe.” A simple example would be saying “we are on target to reach our destination on time unless we meet stopped traffic at 2 in the morning.” If you believe in jinxes, you believe that mentioning that statement ensures you will “meet stopped traffic at 2 in the morning.” It follows that superstitious folks sometimes strategically mention the opposite outcome in hopes to influence an unlikely event in their favor. Stating publicly “the Miami Heat are a lock to win their 24th consecutive game tonight” is a reverse jinx if the orator also bets against the Miami Heat. If reverse jinxes worked, I would probably walk out my front door stating “It’s going to rain today,” and I would get to enjoy dry weather for all time.
The Umbrella Theory
“Umbrella Theory” has a special meaning in the parlance of our household. It stems from the experience that it seems like it never rains when we’ve gone through the trouble to bring an umbrella with us.
Let me walk you through a sample dialog:
Me: Is it supposed to rain today when we’re at the game?
My Wife: I heard it’s a possibility.
Me: Should I take an umbrella?
My Wife: “Umbrella Theory.” Just take it.
What inevitably follows is I take the umbrella with me and the weather stays clear. I simply have to endure the small burden of carrying the umbrella to be prepared, to ensure the negative event I’m preparing for doesn’t even happen.
It turns out I’m not the first to think of this.
What We Have Learned
The Umbrella Theory is admittedly silly. Still, it can be a useful guide in my family’s decision making process. When worrying about what to pack or how to prepare for something, the theory reminds us to prepare for the “Worst” if the preparations are relatively easy. Also, it is important to decide quickly. There is no reason to deliberate with the Umbrella Theory. Time spent determining whether preparation is necessary can just be spent on the actual preparations.
I hope this terminology catches on in your household. May you carry an umbrella with you always!
March 21, 2013 Leave a comment
Memorizing an Entire Speech is Difficult
In December, I completed my 10th and final Toastmasters Speech on the path to fulfilling my Competent Communicator certification.
The intention of the speech was to Inspire with the length being between 8 and 10 minutes.
On one hand, I feel I’ve learned a great deal from presenting 10 speeches at my Toastmasters Club. I’ve become much more confident and have a better feeling for what types of stories work when writing my speeches. On the other hand, I still haven’t mastered the ability to speak, and say everything I want, without notes. This was evident in the below speech. 8-10 minutes is longer than any of the others, so my attempts to memorize the entire thing left me pausing to search for the next line far too often. I am sure I can overcome this struggle with more practice.
With the certification out of the way, I can now relax a bit and have some more fun with my future speeches. I’ve got a couple of clever ideas I can play around with. Stay tuned to see them.
November 29, 2012 Leave a comment
As December nears, it’s time to brainstorm my New Year’s resolutions for 2013. The Stuller family is expecting its first baby in that time, so it’s entirely possible that any goal I set for myself will immediately seem implausible, thwarted by a new dependent and many personal misconceptions about the transition to parenthood. Still, naming my goals will be helpful, even if only the most important bubble up to the surface over the next year.
In Were my Microsoft Certification Exams Worth it I detailed my experience with these types of certifications. My conclusion has been upheld so far, that the certifications themselves do not provide much value once a certain level of experience is obtained. Therefore, I’ve fully abandoned the idea of updating or getting new ones.
“Any sort of certification by a tool vendor is worthless. Any certification created by a methodology proponent is also worthless.” – David Starr on Herding Code episode 150
Despite the quote above, I’ve decided to make Scrum Certification a goal for 2013. I feel I have a good grasp of iterative project management processes but I could benefit from structured training about a specific, standard methodology. I understand that the certification itself is not the end goal, but it is a nice motivation as a milestone of my learning.
“If you go for certifications, remember your goal is not simply to put more letters after your name but to maximize the value of the educational experience. Winning the game requires that you not only keep your eye on the ball but also anticipate what the next pitch will be. Historical evidence suggests that the average lifespan of any system is approximately 18 months, so the planning process for how you’re going to replace what you just built starts pretty much the moment you finish building it. Planning is a lot more effective when you know what you’re talking about. Being informed on emerging trends is a fundamental job responsibility, something in our business that needs to be done daily to keep up.” – 10 Essential Competencies for IT Pros by Jeff Relkin
What am I going to do instead?
Yesterday I read Paul Graham’s most recent post, How to Get Startup Ideas. This blog post really cut to the core of me, as it described the best ways to identify startup ideas. While I sometimes come up with ideas for products, they don’t occur to me as frequently as I’d like. Paul articulated what type of people have the most success, namely those who “live in the future and build what seems interesting.” So that’s what I’m going to strive to do. Throughout my career, I’ve done a pretty good job of solidifying certain skills, such as specific technologies (SQL Server, C#, jQuery) or communication (writing and public speaking). However, I’ve been hesitant to jump into new, trending technologies. For a long time, I considered it beneficial to isolate myself from fad technologies, figuring I can save time that way. In 2013, I’m going to try to both live in the future and build what’s interesting. Maybe that means working a little on a mobile app or maybe HTML 5. I don’t want to constrain my options by listing any technologies before the year even starts. If something seems cool, I’m going to come up with an excuse to build something with it.
I’m scheduled to wrap up my Toastmasters Competent Communicator certification by the end of this year (more on this in a later post). In 2013, I’d like to leverage the practice I’ve had toward some sort of speaking arrangement that advances my career.
As usual, I don’t just make goals for my career. There are also things I strive for in my personal life. Among those, I’d like to complete 1 big home improvement project (convert our half bathroom to a full or move my home office), get back in shape (how about a half-marathon), get involved (with my alma mater or our neighborhood).
What should I do with this blog? This is post 45, which means I’ve devoted over 40,000 words to it. My site visitors are steadily increasing and they are even stable when I take an extended break. However, when I started 3 years ago I thought I would have had more traction by now. I enjoy having a forum with which to express myself but a) I’m running out of content ideas and b) I’m losing motivation based on the slow traffic growth.
Traditionally, I tend to bounce back and forth between technical articles and more generic lessons based on personal stories. Which category speaks most to you? I’ve said everything I need to say from a self-expression standpoint, so when I continue to blog, I want to ensure I’m providing something useful for my readers.
Bring in the New Year
Clearly, many of my ideas are half-baked. That’s partly because I still have a month to decide on New Year’s resolutions and partly because I have no idea what to expect of life with a child. Still, this post is important as a record of my mindset at this critical milestone in my life. It’s also an open invitation for discussion. What other goals or modern technologies should I be considering? How will a newborn affect my personal goals over the year? What type of content should I be producing?
Thanks for your time. You’ll be hearing from me again soon.