LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

Happy Holidays

I'd like to use this blog post to wish everyone a happy Christmas, Hanukkah, druid fest or whatever you're celebrating this time of the year. It has been a great year and I look forward to the year 2013. These are some of the professional goals I have set for myself: Read more technical books. I haven't read almost any technical books in 2012 – shame on me – as I was too busy playing with SQL Server 2012 itself. There's a long long list of books waiting to be read and I intend to do better in 2013. The first book on my list is Microsoft SQL Server 2012 Analysis Services: The BISM Tabular Model by SSAS maestro's Marco Russo, Alberto Ferrari and Chris Webb. Get the MCSE Business Intelligence certificate. I got the MCSA certificate in 2012, so this is a logical next step. I'm a strong believer of certificates (I also hold the MCITP Business Intelligence for SQL Server 2008) so this is high on the list. Learn more about SQL Server 2012. This is closely tied-in with the previous two points. I'd like to play around with Office 2013, the tabular model, PowerPivot and of course PowerView. I spent a lot of time in 2012 exploring the new SSIS and working for my MCSA certificate, so exploring the data visualization parts would be a nice change. Write exciting blog posts. We'll see how that works out 🙂 What do you have planned for 2013? Let me know in the comments!

Read More...

Support for segments in easyhttp

Introduction Because [nancy does not seem to support][1] named url parameters but only url segments and easyhttp makes it’s urls with named parameters only, I decided to add this feature to easyhttp. Url with named parameters http://localhost/trees?Id=1 Url with segments http://localhost/trees/1 How it works You used to be able to do this. var http = new HttpClient(); http.Request.Accept = HttpContentTypes.ApplicationJson; var result = http.Get("http://localhost/trees", new {Id = 1} );``` Which resulted in easyhttp creating a url for you that looked like this. http://localhost/trees?Id=1 From version 1.6.30.0 onwards you can do this. ```csharp var http = new HttpClient(); http.Request.Accept = HttpContentTypes.ApplicationJson; http.Request.ParametersAsSegments = true; var result = http.Get("http://localhost/trees", new {Id = 1});``` Note that the line http.Request.ParametersAsSegments is now true. That property is false by default, as one would expect from a boolean. Which will result in a url looking like this. http://localhost/trees/1 Note that the order of the propertie in the object you are passing is important. ```csharp var result = http.Get("http://localhost/trees", new {Id = 1, Name = "test"});``` Will result in. http://localhost/trees/1/test While ```csharp var result = http.Get("http://localhost/trees", new {Name = "test", Id = 1});``` Will result in. http://localhost/trees/test/1 ## Conclusion Thanks to Hadi for letting me do this. <span class="MT_red">PS:</span> I added a whole lot of documentation to easyhttp in [the github wiki][2]. <span class="MT_red">PS2:</span> And I want to also note that I don&#8217;t like markdown. <span class="MT_red">PS3:</span> And that all the code in this post is C#. [1]: /index.php/WebDev/ServerProgramming/nancy-and-vb-net-using [2]: https://github.com/hhariri/EasyHttp/wiki

Read More...

SQL Advent 2012: Recap

Another year, another SQL Advent calendar has come to an end. This year there was not much SQL code after day 10, I still hope you found it interesting and useful. Here is a list off all the posts with a little blurb about them. SQL Advent 2012 Day 24: Getting help In this post I showed you where to get help and how to use twitter to get some help

Read More...

SQL Advent 2012 Day 24: Getting help

This is day twenty-four of the SQL Advent 2012 series of blog posts. Today we are going to look at how to get help. Imagine if you were stuck with some problem in 1995, you didn’t have that many choices, you could ask the resident know it all at your job, you could lookup stuff in a book or you could go on the newsgroups and try to get help that way. These days there are many more ways to get help. There are many more books than in 1995, there are also a lot more whitepapers available these days. Twitter is a great way to get help as well if you use a special hashtag. Attend one of the many SQL Saturday events, there are always experts available who are willing to help you out with your problems. These events are held all over the world and there is a good chance one will be held near your town as well.

Read More...

SQL Advent 2012 Day 23: Get the tools you need to be more productive

This is day twenty-three of the SQL Advent 2012 series of blog posts. Today we are going to look at why you should get tools to be more productive. In the Reinventing the wheel post I already touched upon the fact that having tools is better than writing something from scratch. I really appreciated tools in 2002. My coworker left for India to enjoy a nice vacation, her code wasn’t due till after she would be back. Then the client changed their mind, I had to move the code in production. I didn’t really know what was changed between her stuff and what was on production. Luckily for me I had this fantastic tool by RedGate called SQL Compare. With this tool I literally found out the difference, the tool scripted out the DDL and DML changes for me and I was golden. I love this tool, I use it and I recommend it. SQL Prompt is another awesome tool from the same company. Yes SSMS has intellisense but SQL Prompt does much more, it will detect PK and FK join conditions and suggest that for you. It works against SQL Server 2005 instance and will also work across linked servers. I also love SSMS Tools Pack, I have a nice review here: SSMS Tools PACK, Something Every SQL Server Developer That Uses SSMS Should Have Installed

Read More...

D

So here we go, this is post number 500 here at the LessThanDot site. Five hundred might seems like a lot but it is not that much when you spread it out over the years. Here is what the breakdown looks like 2008 104 2009 139 2010 82 2011 106 2012 68 Here are all the stats and posts: /index.php/All/?disp=authdir&author=4 Ouch, looks like I only blogged half as much in 2012 compared to 2009. Now, what do you write for a post like this? A couple of w00ts? I can do that. Some balloons, I can do that as well. But I won’t do that, as far as I know I am only half way done from my goal of 1000 posts, the goal which I just created 3 minutes ago that is. Unlike some other people, I have nothing to give away as part of this post. However, stay tuned for the 5 year anniversary there will be some prizes…that will be sometimes in late spring 2013

Read More...

SQL Advent 2012 Day 22: Testing your backup and failover strategy

This is day twenty-two of the SQL Advent 2012 series of blog posts. Today we are going to look at how to test your backup and failover strategy Let’s say your CEO comes to you and asks if your backups are good, you say yes, the CEO proceeds to tell you that the board will be arriving in 5 minutes and he will do a hard unplug of your main server. Have the backup restored within 1 hour. How comfortable are you now? Do you actually even test your backups, how do you know that they are not corrupt? What about failover to the other data center, has this been tested, do you know that it will work?

Read More...

Nancy and VB.Net: the login/logout thing

Introduction Having set up [forms authentication][1] for my little project (which is still on github) I found the need to put a login/logout link/thing on my viewpages. Since I could not immediately find how to this I asked on the <a href=" > e and got a swift answer. That answer helped me along, but we still hit a little bump in the road. Here is my journey.

Read More...

Nancy and VB.Net: Using easyhttp as our client

Introduction Up until now we have used the browser to look at our data. In other words Nancy created a view for us and returned html to the client that requested that information. But wouldn’t it be nice if we could use the same for returning html and/or other formats like json or xml. It turns out to be very easy to do with Nancy. The code can still be found [on github][1].

Read More...

SQL Advent 2012 Day 21: With VLDBs it matters what you do and how you do it

This is day twenty-one of the SQL Advent 2012 series of blog posts. Today we are going to look at why it matters how you do things when working with a VLDB VLD what? VLDB stands for Very Large Database, Not too long ago the definition of VLDB was a database that occupies more than 1 terabyte or contains several billion rows. This of course will change over time, there are quite a few companies with Petabyte size databases. Servers with many CPUs and lots of RAM are required when your databases are big

Read More...