F# and Cool Findings

by Lord Cod3n 31. March 2009 03:42

So I found the video below and began playing with some of the code in it.

http://channel9.msdn.com/pdc2008/TL11/

I am very impressed with F# and planning to see how I can work it into my tool box.  Here is some sample code that goes to Yahoo, pulls down a csv, and parses it.  The syntax, once you are familiar with it, is very easy to read.  So much work with so little code, in my opinion, and it does a lot,  You tell the complier what you want, not what to do.  Here is the code:

#light
open  System.Net
open System.IO
let loadPrices ticker =
    let url = "http://ichart.finance.yahoo.com/table.csv?s=" + ticker + "&d=2&e=31&f=2009&g=d&a=2&b=13&c=1986&ignore=.csv"
    let req = WebRequest.Create(url)
    let resp = req.GetResponse()
    let stream = resp.GetResponseStream()
    let reader = new StreamReader(stream)
    let csv = reader.ReadToEnd()

    let prices =
        csv.Split([| '\n' |] )
        |> Seq.skip 1
        |> Seq.map(fun line -> line.Split([| ',' |]))
        |> Seq.filter(fun values -> values |> Seq.length=7)
        |> Seq.map(fun values ->
            System.DateTime.Parse(values.[0]), float values.[6])
    prices
open System.Windows.Forms
let grid(prices:seq<System.DateTime * float>)=
    let form = new Form(Visible = true,TopMost = true)
    let grid = new DataGridView(Dock = DockStyle.Fill,Visible = true)
    form.Controls.Add(grid)
    grid.DataSource <- prices |> Seq.to_array

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Silverlight 3 and Prespective 3D

by Lord Cod3n 27. March 2009 05:45

I was very excited about Silverlight 3 even before I watched some of the sessions at MIX 09.  I did find something interesting out about SL3 uses  something called perspective 3d.   I believe perspective 3D is not true 3D but  a visual trick to makes 2D object look like they are in 3D space. It is still pretty cool to see. I will be blogging a ton more as I get deeper into the new features.  Coden Enterprises is strong and helping to move companies to adopt these ground breaking technologies.

I am giving two presentation this weeked for the Boise Code Camp.

1.  Building Business Applications with Silverlight 2.  I am going to cover the SilverlightFX framework from  Nikhil Kothari his blog can be found here:  http://www.nikhilk.net/

2.  Silverlight 3.  This is going to be more about what I absorbed since mix 09 last week.

This framework is awesome and you should look into it.  It has cool effects transitions and commanding behaviors.

Happy Coding

Bill

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Windows 7

by Lord Cod3n 11. January 2009 05:18

Due to some problems with my laptop (requiring return to Gateway for repairs), I decided that I would install Windows 7.  I am geek anyways.  I love new toys, new servers, new operating systems, new browsers, and Silverlight. It takes me about 4 hours at most to restore my system to a working state.   That being said, I would have done it even if I did not have to reinstall my operating system to factory default before sending it in.  

I was more than pleased with the beta release.  Here are some noteworthy things about Windows 7:

  1.  
    1. Startup and Shutdown times are significantly reduced.
    2. The Task bar has been revamped and seems much more functional.
    3. All the icons on the taskbar and system tray can be moved around.
    4. When you mouse over IE  in the taskbar it shows all your open tabs in preview windows.
    5. When you mouse over one of the preview windows for a second, it will bring that tab/window to the front so you can see the full window.  When you move off the preview window, it restores your previous view.
    6. If you shake a windows title bar all other windows are minimized.

My wife did a fresh install, and I did both the upgrade and the fresh install.  The installation in all cases went pretty much flawless.  Almost all my drivers where there out of the box.  My wife had to download drivers for her SD Card reader.  We also had a few hiccups with printing and getting on the network.  My wife’s wireless network card on Vista supported 11g Enhanced it would not connect on Windows 7.  I had to switch my network to 11b/11g Standard for her wireless card to connect.  If anyone else is having wireless issues, try switching your network to 11b/11g Standard.   I am attempting a blend project today on Windows 7 and will let you know how the development experience goes.   All-in-all, I am very pleased with how stable and refreshing the this OS release is.

Thanks and code happy,

Bill

***Edit*****

Virtual Clone Drive and Magic Disk do not work with Windows 7 at this point.  These programs also uninstall incorrectly.  I am curious on why windows has not added support for mounting iso.  All my msdn subscriber downloads are iso's.   Why waste the disk by burning it?

Getting an activation key from MSDN subscriber downloads is also broken.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

BizSpark, Team System, and a Lot of Help

by Lord Cod3n 20. November 2008 07:23

BizSpark

First off, I would like to thank some people for helping us get into the BizSpark program for technical start ups.  You can find information about it here:  http://www.microsoft.com/bizspark.

Microsoft was a great help in pointing me in the right direction.  Thanks to Mithun Dhar and Anad Iyer for their help.   I would also like to thank Michael Baum of Magenic (http://www.magenic.com) for his help .  Magenic was the only listed Network Partner that I had previously spoken with.  Upon Microsoft’s recommendation to work with someone local, we contacted Richard Hundhausen, Team System MVP, of Accentient (http://www.accentient.com). He was our sponsor and responded very quickly to our request to enter the program. 

Thank you Richard!

For those of you interested … BizSpark provides start-up technical businesses with support resources, visibility, and a subscription to MSDN Premium with Expression Blend.  The software package is amazing.  It will provide our company with a head start and the technology we need to sell Microsoft based solutions with minimal out of pocket expense. 

 

Team System

Team System is awesome and terrifying at the same time.  There are a lot of moving parts that need to align perfectly.  I spent a fair amount of time trying to track down issues.  If you are using Team Foundation Server on Windows Server 2008 and SQL Server 2008, you have to do a weird merge of the install disk and Service Pack 1.  Once you get it up and running, it is neat but we have ran into lot of issues. 

I still cannot see reports remotely through Visual Studio.  I could at one point in time after re-applying service pack 1 for Visual Studio 2008 , but after a reboot that functionality no longer worked.  All in all, it is a great product.  We plan to use it to get things moving in a more focused direction.  We already created a TFS project for the family (I love data points).

I am pretty sure my issues are related to permissions/security.  It seems ok if you use the local admin login via the web for reports, but it will not work with my current domain login.  If anyone else has experience this issue, please share your insight.

 

Code Happy,

Bill

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Ok Ok Wow

by Lord Cod3n 4. November 2008 13:52

So I am not a big political fan.  I happened to turn on CNN and saw and interview with someone that was a 3D projection.  Is this real?  If so I wanna be a hologram please.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

PDC 2008 Goodness

by Lord Cod3n 4. November 2008 12:45

Check out here to watch some of the available videos of sessions from the PDC.

https://sessions.microsoftpdc.com/public/timeline.aspx

 

JQuery

There is a new jquery file download that will give you intellisense in Visual Studio 2008.  You can download it from here:

http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6-vsdoc.js

 

Now lets figure out how to get it to work.  I did not see instructions on the download page. 

NOTE: It seems that if the file exists in the same directory, intellisense will work.  I excluded them from my project and still was able to use intellisense.

 

This is how I did it.  I added the vsdoc file to the js folder.  I added the jquery java script file to the project.  Then I added the

/// <reference path="jquery-1.2.6-vsdoc.js" />

to my external java script file.  The articles posted below also post information how to do it inline.

 

That was not so hard.  Here is some interesting reading on it:

http://blogs.msdn.com/webdevtools/archive/2008/10/28/rich-intellisense-for-jquery.aspx

http://blogs.msdn.com/webdevtools/archive/2007/11/06/jscript-intellisense-a-reference-for-the-reference-tag.aspx

 

Happy Coding,

Bill

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Silverlight, Web Services, and Custom Classes Part I

by Lord Cod3n 28. October 2008 14:21

I know Silverlight.  I know data binding.  I know data binding in silver light to simple object, but custom objects tend to be a bit more interesting.   The problem started simple.  Lets use linq to sql to return a table called assets, and bind it to a grid in Silverlight.  Not so easy.  Why because you cannot to my knowledge use linq to sql with silverlight.  The silverlight runtime (which is a subset of the .net runtime) does not include linq to sql.  Ok  so lets  return a list of asset objects created and transformed into a custom class from a webservice.  That did not work.  Here is the first article I read on my Endeavour:

http://timheuer.com/blog/archive/2008/03/14/calling-web-services-with-silverlight-2.aspx

It looks like I could return xml.  This will work because silverlight supports Linq to XML.  Have I mentioned my foundness of Linq ;).    I should have known you cannot return a type of  XDocument.  I am going to return it as a string and convert it on the client. 

I started reading about linq to xml here:

http://www.hookedonlinq.com/LINQtoXML5MinuteOverview.ashx

Side Note 1:

Now this was a horrible idea.  It was recommended though.  I am running with a new testing framework called Test Driven.Net.  I need to detour to read about it.  Here is the link.

http://www.testdriven.net/quickstart.aspx

Back on topic soon. 

Here is the code so far to generate xml document from a linq to sql query

            var db = new AssetDataContext();
            var xml = new XElement("Assets",
                                   from rec in db.Assets
                                   select new XElement("Asset",
                                               new XElement("Barcode", rec.Barcode),
                                               new XElement("AssetNumber", rec.AssetNumber),
                                               new XElement("BarcodeChanged", rec.BarcodeChanged),
                                               new XElement("Comments", rec.Comments),
                                               new XElement("CurrentStatusCode", rec.CurrentStatusCode),
                                               new XElement("Description", rec.Description),
                                               new XElement("EquipmentNumber", rec.EquipmentNumber),
                                               new XElement("LastAudit", rec.LastAudit),
                                               new XElement("LastScan", rec.LastScan),
                                               new XElement("LastUser", rec.LastUser),
                                               new XElement("Location", rec.Location),
                                               new XElement("Manufacturer", rec.Manufacturer),
                                               new XElement("Model", rec.Model),
                                               new XElement("OldBarcode", rec.OldBarcode),
                                               new XElement("Picture", rec.Picture),
                                               new XElement("PlantName", rec.PlantName),
                                               new XElement("PlantNumber", rec.PlantNumber),
                                               new XElement("RecordFlag", rec.RecordFlag),
                                               new XElement("RequestedStatus", rec.RequestedStatus),
                                               new XElement("SerialNumber", rec.SerialNumber),
                                               new XElement("Sync_Start", rec.Sync_Start)));
            return xml.ToString();

I going to go ahead and post this up. I will follow it with more parts as I progress in the next couple of days. 

Side Note 2:

I am done with my presentation cd so those of you who asked for a copy of the cd it will ship out tomorrow.

Code Happy 

Bill Moore

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

It is coming

by Lord Cod3n 20. October 2008 04:59

My presentation went well on Thursday.  I took a short break afterwards to recharge the batteries and attend to some clients.  I will be posting up a video of the first hour of my talk, and the code samples.  If anyone of the attendees would like a copy of the presentation and the DVD I am making please send me an email.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Silverlight 2.0 final Release

by Lord Cod3n 14. October 2008 03:03

Wow I came across RC0 release last night.  I know I am a little behind.  Wearing all hats in a company tends to shift focus rapidly.  Here is Scott Gutherie’s well articulate blog about the release.

http://weblogs.asp.net/scottgu/archive/2008/10/14/silverlight-2-released.aspx

I am currently working on a presentation for the Beta 2 release.  I am going to go back and redo it for the final release.  Keep note there are breaking changes. 

Code Happy,

Bill

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Helpful Advice and New Direction

by Lord Cod3n 3. October 2008 09:37

We were lucky to get some advice from a great marketer.  His name was Gary Rosensteel.  He runs a website that helps offers start up advisory services for new companies at http://www.nucopro.com/ and an comprehensive entrepreneurial support web portal at http://helpstartups.com/

We were very appreciative to receive an hour of his time.  He helped us look at were we are and were we need to be.  We are going to correct course for the company and narrow our focus.  After speaking with Gary, we realized our current scope was still too broad.  He also mentioned finding a niche market and working towards excelling in it.  I am not sure what markets would the best to focus on right now with the way IT is changing.  I really want to help people develop good software and learn the new technologies, but the training market is over saturated in certain areas.  It was brought to our attention that when times are tight, this is the first part of the budget to get cut.  We have decided to move forward with three objectives: 

1.  Individual Developer Training Packages 

These will be focused on individual developers needs and will be priced so individual developers can purchase them. If their companies are willing, maybe they can be reimbursed.  I really hope to find a niche market here, and I don’t know of any other companies with these offerings.  This is going to have the least amount of focus, and we will be testing the space with our product offering.  We hope to have our first packet out within the next month.

2.  Kids Programming Course 

This is another one I think will be a lot of fun and maybe moved out a bit on the time line.  I am going to start look into setting up a package.

3.  Custom Software Development 

We have always been interested in custom software development and will continue to pursue this as the main source of income for Coden Enterprises.

 

I am still dedicated to pulling my TDD knowledge to the next level.  I have finished the book “Test Driven Development by Example” by Kent Beck. I will be continuing to focus on TDD as much as possible.  I am going to move Refactoring, Silverlight, JQuery, Powershell, and Sql Server 2008 way up the list for studying in attempt to adjust my focus.  

Code Happy,

Bill   

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

William Moore is the lead Software Architect and Technologist for Coden Enterprises. He has more than a decade of software development experience primarily Microsoft Platforms.  William enjoys the full gamit of coding everything from the UI down to the database.

Most comments

Page List