My Slovak Sabbatical

Well we’ve been back in the States for a month now, and I’m finally sitting down to write a blog post reflecting on our experience spending the last year and a half living in Slovakia. It was a bold move, one which mostly confounded friends and family, but which paid immense dividends, both in terms of personal and professional growth. I called it my “sabbatical year,” even though I really didn’t stop working. What I did, though, was to go independent, working freelance for an international developer training company, while residing in a country where the cost of living was substantially lower and the pace of life significantly slower than the one I had been leading in Southern California. Although I probably could have pulled it off, I decided not to take a pure non-working sabbatical, as I had from 1998-2000 when I first lived in Slovakia. At that time, I swore off technology of all sorts and spent my days immersed in Slovak language, culture and society. In the process I gained a new understanding of what was most important in life, namely, building strong friendships and helping others. Having had a large student loan payment, I eventually had to find work (training developers at Siemens), but my goal at that time was to rest from the intense labors of the previous 6 years and reorient the priorities of my life. And I was successful in this endeavor, the fruit of which was meeting the love of my life and returning with her to marry and live back in Southern California.

But after having worked another 6 years, mostly as a principal developer for the Walt Disney Studios in Burbank, and after having spent countless hours in establishing a non-profit corporation, it looked like I needed another break, a sabbatical. However, this time the goal would be different. This time, I had a family to support, and I needed to revamp my professional life. Rather than simply taking a break from work, what I needed to do was transition into a new career and restructure my life to allow more time for the things that really mattered and, in particular, to be able to be present with my wife and son during the day. I realized that, after having spent the past 6 years working a nine-to-six job with an hour commute each way, which basically meant I was out of the house from 7 am to 7 pm, I was not able to spend enough time with my spouse to establish a foundation for marital and family life that would take us through the long haul. And it wasn’t just the time away from home. Most of the time, I would come home from work so depleted all I wanted to do was zone-out in front of the tube, lacking the energy to engage other human beings. The weekends were spent mostly running errands and maintaining the house. After 6 years of this existence, I had to ask myself the question, “Is this what life is really all about?”

Continue reading

Posted in Personal | Leave a comment

Arresting Spam

About a year ago I posted a blog entry on the problem of spam and what measures we have available as individuals to take back our inbox from spammers. At the time I started using a service called SpamCop, and I’ve been fairly happy with it. For the price of about $30 per year, SpamCop.net will filter out suspected spam and leave only legitimate emails in your inbox (however, a few spam emails do get through from time to time). The way is works is that you set up your mail server to automatically forward all emails to your SpamCop email address, then suspected spam is placed in a “Held Mail” folder, which you can inspect to see if it contains any legitimate emails.

The only issue I have with the service is that, by requiring me to review items in the Held Mail folder, I still have to deal with spam on at least a weekly basis, taking up time that could be spent doing other things. So I finally decided to check out another service, called SpamArrest.com, which uses a combination of a white list for pre-approved senders with a challenge-response system for accepting mail from people not already on the white list. What I like about this approach is that it catches 100% of incoming spam, and I don’t have to take time to go through possible spam emails looking for legitimate senders. The exception to that rule is when I sign up for an online newsletter or wish to allow email statements from institutions like banks and travel clubs to reach me. In that case, I will look at the “Unverified Mail” folder to select and approve the automated email. But I don’t even have to do that if I simply check my inbox for these types of emails and add them to my approved senders list.

Continue reading

Posted in Personal | Leave a comment

Creating ASP.Net Apps Under Projects

I like to keep all my stuff in one place. If I create a web app using Visual Studio, I want to keep it in my Projects directory, along with all my other code. If all you’re using is the development web server (aka the File System option) when creating web apps, you’re fine. But occasionally, you might need to use IIS (aka the HTTP option). Now, if you create the web app in the default location, which is under c:\inetpub\wwwroot, the permissions will be inherited from the parent folder and all will be well for you.

Continue reading

Posted in Technical | Leave a comment

Tweaking Skype on Your Dev Machine

If you’re like me, communicating with others via Skype is as essential to daily living as breathing. But when it comes to running Skype on your dev machine, you need to make a few adjustments. By default, Skype will grab ports 80 and 443, which are used by IIS. So if you need to work on an ASP.Net web app using HTTP, you’d better watch out for this one.

If you want to keep Skype running and not have it grab these ports, just change the connection settings for Skype.

Namaste.

Posted in Technical | Leave a comment

Customer Service? It Depends on Your Point of View

As someone who regularly travels to different countries, I’ve taken notice of how various cultures view the concept of customer service. The age old phrase, “The customer is always right,” is something we’ve come to take for granted in America. And while we experience different levels of customer service in the States, we feel we have the right to register a complaint if we feel the service is not up to snuff, with the fairly reasonable expectation that our complaint will be heard and most likely acted upon. When traveling within the United States, from Los Angeles to New York, and most places in between, I have come to appreciate and expect this basic understanding of what customer service means. However, after having traveled extensively within Europe, I now realize that America is quite unique in promoting a mentality that is truly customer service oriented.

In Eastern Europe they have no concept of what it means to be customer service oriented. For example, when I walk into a travel agency in Bratislava or Kosice, the two largest cities in Slovakia, the person behind the counter is angry and resentful that I entered the establishment. In one case, I was even told to leave and go to another agency, because my coming in the store meant that the travel agent would have actually have to do some work! And, while that sounds utterly ludicrous to American ears, it makes perfect sense to Slovaks with whom I’ve shared the story. In a society that was based on Communism for 50 years, where people could not be dismissed except for criminal activity, and where good performance is frowned upon because you’re making your co-workers look bad, customers are generally looked upon as an annoyance rather than as an opportunity to increase business. That’s because in a socialist society, where incentives for hard work are lacking, people have no motivation to go the extra mile to satisfy a customer.

Continue reading

Posted in Personal | Leave a comment

Understand LINQ in 15 Minutes

I recently penned an introductory article on LINQ (Language-Integrated Query) for the September issue of the DevelopMents newsletter, published by DevelopMentor to highlight various technologies taught in our courses:

http://www.develop.com/us/email/developments/developments091107.html

In addition, I authored the LINQ module (both slides and lab) for our upcoming Guerilla .Net course taking place Nov 12-16 in Tampa, Florida.

LINQ is an exciting technology that will truly alter the way you write code. It incorporates enhancements made to the C# and VB.Net programming languages, and at the same time will cause you to approach age-old problems from a new perspective. For example, instead of whipping out a for loop to extract specific items from a collection, after learning LINQ you’ll most likely use a query expression, the primary benefit of which is to make your intent as a developer more evident. This follows a trend we’re seeing from an imperative style of code (concerned with the “how”) toward a more declarative style of code (concerned primarily with the “what”).

In addition to a shift in programming models with the ability to query in-memory object collections, the first release of LINQ comes with an object-relational mapper (called LINQ to SQL) and an XML query language (called LINQ to XML). I address both of these in the DevelopMents article mentioned at the start of this post. So take a look, and feel free to send me your feedback or questions: tony@tonysneed.com. ou also might want to check out the LINQ Project home page:

http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx

Namaste.

Posted in Technical | Leave a comment

System.Transactions and the DTC

I recently had to use System.Transactions to perform multiple database updates in a single atomic operation. At first I was going to use the native SQL Server transaction API, but I like the auto enlistment feature of System.Transactions – hey, one less line of code to write! The thing is, if you’re not careful you could end up dragging in the Distributed Transaction Coordinator (DTC), even though you’re only using a single database. How? Just open a database connection each time you perform an update. But wait a minute. Isn’t that what you’re supposed to do? The way to play nice with the connection pool is to open the connection just before you need it, then close it as soon as you’re done (probably by incorporating the SqlConnection into a C# “using” block). In that case, you’re not really closing the connection, just returning it to the pool, where it can be reused.

The problem with using this approach is that you need to hold a single connection open across all updates that you want to include in the transaction. That’s true whether you’re using the native SQL transaction API or the System.Transactions API. So you’re code might look something like this:

using(TransactionScope scope = new TransactionScope())
{
    using(SqlConnection cn = new SqlConnection(“connectionString;”))
    {
        cn.Open();
        ProcessUpdates1(cn);
        ProcessUpdates2(cn);
        ProcessUpdates3(cn);
    }
}

Continue reading

Posted in Technical | Leave a comment

Change Tracking Across Tiers

If you’ve at all paid attention to much of the buzz surrounding Visual Studio code-named Orcas (available now in Beta 1), which is set to hit the streets by the end of 2007, you know that Linq stands for “Language Integrated Query,” a feature supported by the next versions of C# and VB that allows you to query data with SQL-like syntax right from within the language. And by data I mean not just relational data stored in tables within a DBMS like Oracle or SQL Server, but also XML, in-memory collections (anything implementing IEnumerable<T>), plus the forthcoming ADO.Net Entity Framework, and various other stores and data facades, such as LDAP, NHibernate and even Amazon. In case you’re wondering, it’s been announced that VS Orcas will include Linq to SQL but not Linq to Entities, which will come out sometime in the first half of 2008. To find out more, check out the Channel 9 Entity Framework video and this collection of Linq white papers. One of the best Linq tutorials, in my opinion, is Anders Hejlsberg’s recent Linq Session at MIX. As if all this weren’t enough, there were also announcements at MIX on Astoria (data as XML over HTTP) and Jasper (codeless entity generation and data binding for dynamic languages).

[If you want to cut to the chase, you can download my ChangeTracker with sample code. You can also download my LinqSqlNTier project, which was creating using VS Orcas Beta 1.]

Continue reading

Posted in Technical | Leave a comment

Taking on WPF

The time has come for me to take on the Mount Everest of .Net 3.0: Windows Presentation Foundation (WPF). A while back I posted a blog entry on my approach to learning Windows Communication Foundation (WCF), so I thought I would do the same for my take on how best to learn WPF.

Before I get started with book recommendations, let me give you my general impression of WPF in comparison with the other big pillar of .Net 3.0, WCF. At the risk of oversimplification, I would say the main story of WCF is that it is mainly a unification of existing distributed computing technologies, while incorporating a set of web service interoperability standards called WS-*. The architecture allows for Service Oriented Architecture (SOA) while decoupling the service contract from the underlying transport protocols.

Windows Presentation Foundation, on the other hand, is all about power, the power to write GUI apps in a way you could not do with the prior presentation technology, which was based ultimately on User32.dll and hasn’t fundamentally changed since the days of Windows 1.0. Windows Forms simply covered that technology with a managed wrapper but was still limited by what happened underneath the wrapper.

Continue reading

Posted in Technical | Leave a comment

A Day with Boy Wonder

Anybody remember Boy Wonder, the pint-size version of Super Man? Well, today I had the pleasure of spending an entire day with the caped crusader, none other than my son, Kerrigan. Having spend most of the last month away from home, teaching courses both in London and Los Angeles, I now have the opportunity to spend two whole days with Kerrigan all on my own, while my wife, Zuzana, attends her 15-year high school reunion in the city where she grew up, Banska Bystrica, Slovakia. [This post was written on April 28, 2007.]

First, some basic observations on Keri’s budding personality.

Keri really knows what he wants, and he has no trouble expressing it. He let me know every step of the way. When he wanted to watch a “Miss Patty Cake” video, he would take me to the computer and clap his hands (that’s her call-sign). For what to eat, he would point to each item, bread, yogurt, soup, and also show the sign for “more” (touching your fingers together). His favorite now is bottled cherries prepared by his great grandmother (Zuzana’s grandmother). For that, he takes me to the fridge, opens the door (or at least tries to), then points to the shelf with the cherries on it.

He loves books. In the evening, he thumbed through a book on “Investment in Slovakia,” prepared by the accounting firm, KPMG (where Zuzana used to work). He was actually engrossed by it. He climbed up into a chair, curled up with the book, and proceeded to flip through each and every page. I managed to grab the video camera and captured the episode on tape.

Continue reading

Posted in Personal | Leave a comment