Rob’s Mind Flow

Random thoughts. Many topics. Find something intersting to you.  

Email Newletters and what not to do

Ok, my email newsletter marketing tactics and copywriting skills may not be dead-on, but I know a thing or two and well, this made me click delete.

I also know that I'm not really the target of this newsletter. I'm not a 3D animator or invigorator. But when I open the email and see the big  unsubscribe link it really is temping. Especially when the first line of body copy is REALLY that good too.

I try hard to just not suck. And that keeps me busy.

Comments [0]

Linq to SQL and connection string in the web.config file

Maybe you've never run into this problem before but I have. And it's a pain in the butt when it happens. When you create your .dbml file in Visual Studio the connection string to the database is stored in a couple of different locations and none of them are in the web.config or app.config file.

You're ready to test or launch the site and want to change the connection string, but it isn't centralized and isn't really that easy to find.

Take a look here (http://goneale.com/2009/03/26/untie-linq-to-sql-connection-string-from-application-settings/) for instructions on how to use the app.config or web.config file to store the connection string

 

Filed under  //   .net   configuration   linq  

Comments [0]

See a need fill a need. MVC, Web Forms, SharePoint, Ruby, PHP and a cartoon

Robots is one of my kid's favorite movies. I like it too. "See a need. Fill a need." is the motto of the main character. He's a young inspiring inventor. It's a phrase he heard as a child from one of his role models, Big Weld, an older, successful inventor. I struggle with wanting to do things right. To provide the right solution at the right price and on the right schedule. And that's all well and good. Great goals. "Right" isn't always easy to quantify. Who gets to define "right" in this case?

Choose a platform, a language a framework. Define the specs and create and architecture. But dang, how do I know if it's "right?" It isn't when I say it's right. It's when the users say it's right. That's the key. Isn't it? If it doesn't fill a need - and provide a good experience - then it isn't right. Even if my architecture is perfect, my code pretty and I've got a green light on all my tests.

Yeah, I know, the "acceptance test" is the final test and of course if that doesn't pass it isn't right. But it is still possible to do something that is accepted, but still not right.

So, it doesn't matter if you use Ruby, PHP, ASP.NET (Web forms or MVC), mySQL, MSSQL, Oracle, Linux, Windows, Mono, Perl, TDD, BDD or any other software, tool, platform or framework. If you don't fill the need you don't win.

Filed under  //   general   Process  

Comments [0]

Nobody wants my Code...either

I love code. My Code anyway. I think code should work and be simple, clear, readable and maintainable. I think it should be pretty too. It shouldn't hurt your eyes or your brain to look at it on the screen. But in truth, I'm the only one who wants my code.

Bevan at nicheSoftware puts in better here:  http://www.nichesoftware.co.nz/content/nobody-wants-my-code

Filed under  //   general  

Comments [1]

Continuous Integration Learning Process from a .NET developer (Part 3): New Tools

Okay, it's only been 2 months since my last post. I've been twiddling my fingers a lot. I have made some progress in my CI endeavors and I've changed my tools around a good bit here in the last few weeks.

I got really tired really fast of editing the XML configuration files for CC.NET. I'm not all that much of a fan of the MSBuild XML files either. I was having to change both a good bit when creating a new project.

Of course, not all my projects get put into the CI cycle. Small little apps just don't make it there. No need. Like I've said before I typically work alone. CI (I’m sure) has more advantages when on a team, but I'm hooked as an independent developer too.

So now for the update

I've switched from Cruise Control.NET to TeamCity. I think they are both really good products. I think TeamCity rocks with the configuration in the browser and no more editing of the XML files. TeamCity also has more polish in the UI itself. Its more pleasing to the eye.

I've also switched my testing frameworks around a bit. I'm still using xUnit. But I'm also using mSpec. I really like the BDD approach. I've tried to do that when I write xUnit tests, but it just isn't the same as using a framework that is built for BDD. Some say that the code style of mSpec is just too wacky and is foreign to c#. Personally, I like it. But that’s just me.

Subversion is still awesome and I don’t anticipate changing that. I’ve got TortioseSVN installed and also using the VisualSVN plugin fro Visual Studio.

Note: Take a look here for a good BDD overview and here for some more information about setting up mSpec within Visual Studio (both from Rob Connery). It is definitely possible to use TD.NET and ReSharper to run mSpec tests.

A bit more detail

Since TeamCity can’t run xUnit or mSpec tests natively there are some configuration changes to make and one XML file to configure.

Here’s how I’ve set it up. In TeamCity I set by build runner to be MSBuild. I created one MSBuild file (that is stored in my VCS with the project of course). The MSBuild script is pretty simple and should work for most of my projects. Take a look below and then I’ll walk you through it.

What I basically do is set up a list of solutions by doing a search of my Source directory for any file with an .sln extension. Typically there will be only one of these. I do a search for the Specs and the Tests as well just using simple wildcard searches. The “debug” in there should probably be removed and replace with a setting variable, but I haven’t done that yet.

This can be run from the command line locally or from within TeamCity. When in TeamCity I added “/p:SpecsForTeamCity=--teamcity” to the Command line parameters field. That way when running locally I just get the basic console output from mSpec but when in TeamCity I get the right content there too.

I expect this build script will work for just about all of the projects I’ve got going now. That wasn’t the case with my previous CC.NET files.

What are the benefits of CI

Feedback. It nice to see the dev project working. Compile. Pass test/specs.

Next steps

Release management. Tag a successful build and then release it. Post to the server as a site or as a downloadable installer or .zip of the exe and related files.

Filed under  //   Continuous Integration  

Comments [0]

Continuous Integraton Learning Process from a .NET developer (Part 2): The Tools

So I've decided on my toolset. It became rather obvious as to what I was going to use as soon as I started looked. I have to also admit that I had looked into CI before so I had a bit of an idea as to what I was going to use. Here's my list:

  • CruiseControl.Net
  • Subversion
  • NAnt
  • NUnit (would prefer xUnit, but I’m going to get setup with NUnit first).

So this is where I’m starting and will be the base set of tools. I’m going to probably add NDoc, FxCop and some other tools to the list soon, but wanted to get up and going quickly and the above list is the bare minimum I think.

Subversion and CruiseControl.Net are already installed and working just fine. NAnt, NUnit are on the CI server and ready to go. That was the easy part.

Like I’ve mentioned before I’ve mostly worked alone and inside Visual Studio so the biggest learning curve is coming from writing the build scripts. The XML configuration file for CruiseControl.Net is fairly straight forward. It isn’t the easiest thing I’ve ever done, but I’ve almost got my head around it. The biggest hurdle is writing the NAnt build files. Just a matter of getting my head around it. I’ll try to get some thoughts together as I learn it and post them here. It’s hard to say much while I’m still in the learning process myself.

Let’s talk a bit about CruiseControl.Net Configuration

I’m running cc.net as a Service. I’ve move the ccnet.config into a config subdirectory and added that directory to svn. My first project in the ccnet.config is one that watches the config svn repository for changes. The ccnet.config file is also simplified a bit. I’m putting projects in separate XML files and using entity definitions to include them in the ccnet.config file.

Here’s a sample of what my ccnet.config file looks like:

The cc-config project is used for watching for updates to the config file. I know that cc.net watches for changes to the ccnet.config file itself, but it was ignoring changes to the projectName.xml file. Adding this project seemed to overcome that and will refresh all the projectName.xml files whenever a change is committed to svn.

I’ll get into more detail in the project configuration files in a later post.

Filed under  //   Continuous Integration   Process  

Comments [1]

Continuous Integration Learning Process from a .NET developer

Ok. Things are changing around here. I have typically worked on projects solo and to some degree in a vacuum. I’m now working on larger projects with more stakeholders involved. This requires a change in my programming practices.

I learned a while about the importance of a version control. I’ve been using Dynamsoft’s SourceAnywhere (http://www.dynamsoft.com/) for about 3 years now. I like it and it has served me well. It was very easy to setup and get going for the newbie. All wasn’t perfect, but very good and easy. Everything was on my development machine which isn’t ideal, I know, but it worked for me. Now I’m changing my workflow a bit and my tools are changing to fit that workflow as well.

I’ve just started using CollabNet’s Subversion (http://www.open.collab.net/products/subversion/) and TortoiseSVN (http://tortoisesvn.net/) for versioning and SCM. It was fairly easy to set up and get started. Not as easy as SourceAnwhere, but not like painting the Mona Lisa either. Here’s a fairly good tutorial on the setup process http://www.west-wind.com/presentations/subversion/, but the Subversion and Tortoise documentation is incredibly helpful and well (and that’s saying something for free software).

 

As a side note: using TortoiseSVN and Subversion allows me to put anything under versioning control: Design files, Word docs, planning documents, anything. TortoiseSVN integrates with the explorer in Windows and with a right-click anything can be put into a Subversion repository.

I did miss the Visual Studio integration so the addition of one more piece of free software fixed that: AnkhSVN (http://ankhsvn.open.collab.net/).

Now instead of my versioning repository being on my development machine it is on a separate server for all of us developers to access.

The next step is continuous integration. I’ve got another developer or two that will need access to files as well as other stakeholders (and myself) who would like to know the status of the latest commits. Having a tool to build, test and generate reports when new code is checked in will be a great improvement to what I’ve been doing.

Over the next few posts I will outline what software and tools I’m using and how things are going. I don’t anticipate this being a lengthy process – nor do I see these posts being great tutorials – just pretty good information.

As I post other articles I’ll try to remember to update this one with links. If I don’t, well, just say something a bit mean under your breath and forgive me.

Filed under  //   Continuous Integration   Process   SCM   Subversion  

Comments [0]

3 Questions you should be asking about your blog

Write on a regular basis, pick topics people care about and be upfront about relationships you have with sponsors.

These are very basic questions, but how many times have we failed to aske them about our blog? or any piece of content for that matter.

What is one post per month really worth? what about 7 a day? What does regular mean to you and your audience. It isn't the same for everybody.

Pick topics people care about. Most of the time. If I were to be totally honest, I blog for me not you. I ramble and store ideas. Put things here that have helped me and I want to remember. I hope that you'll read it and learn from it as I have. But I primarily write for myself. It's not that I don't consider the audience that may read this. But I don't have that audience yet. It's not that I consider you the reader it's just that I don't know you yet. Overtime. I'll come to and then perhaps my writing will change a bit - perhaps not. Time will be the tell.

And about sponsors: Obviously, I don't have any now. May not ever have in. But I will be honest here. I won't deceive my readers.

Anyway: Read and learn from the post mentioned above. Enjoy.

Filed under  //   about   blog   tips  

Comments [0]

MonoTouch Beta

Finally have my beta invite for MonoTouch. Looking forward to digging in, learning, providing the great guys who put it together some feedback and most importantly, building some iPhone apps. I wish I could dig in and get going right now but alas, I have other work to get done. (That’s a good thing.)

I’ll be posting over the next few days and weeks with my experiences using MonoTouch and how well the app building process goes. Curious to think what Apple thinks about using a Microsoft (mostly – c#) to build an app for the iPhone.

Filed under  //   iPhone   monotouch  

Comments [2]

Socially Famous

I found this fascinating quote today:

I guess it’s some basic human desire to be famous. Even if it’s just “famous” in certain circles

New Comm Biz » You Do Not Have to be Social Media Famous., Aug 2009

Read the whole article @ http://www.newcommbiz.com/you-do-not-have-to-be-social-media-famous/

If you’re willing to invest the time, Social Media can work for you. Heck, perhaps it will even work for me. Personal investment to learn the tools and take the time to participate. Remember that it is social. Social skills are needed. You still have to be able to carry a conversation.

I’m late to the social media game. But I’m here now and I’m playing. I’m not a quarterback, not even on the field yet, but I’m participating in the practice and keeping the bench warm. I’m building my skills and increasing my knowledge so that when it is my turn or my clients turn to get out on the field I’ll be ready.

Filed under  //   social  

Comments [0]