For those of you who use a dynamic DNS service (DynDNS, no-ip, etc.), I wrote a C# based updater client. The project contains a class library, console app and service. It is designed to be extended to other mechanisms for fetching the IP and reporting it to the DNS server. Right now it uses the checkip service of dynDNS and updates RegisterFly.com. Full VS2005 project and source code available
here.
2dcd23ba-645b-4f05-b2c9-63a8c2a1184b|0|.0
I will be presenting at the July WI .NET Users Group Meeting. The topic will be an “Introduction to Grid Computing.” The meeting is at 7:00 on July 11th at the Medical College Building. Here is the summary from the UG page:
Have a power hungry application on a machine that just can’t handle it? Don’t buy a faster machine, steal the cycles you need! In his presentation, Chad Albrecht will discuss the basics of grid computing using .NET technologies. Grid computing provides an interesting means of distributing applications across any number of machines. Learn the fundamentals of grid computing, data grids, basic SQL Server scaling out and a few other tricks. Those in attendance will be able to use their laptops as active grid nodes, so make sure to bring it along!
Hope to see everyone there!
9589123f-1030-42e2-908b-693beaabab10|0|.0
The Alchemi team mentor, Dr. Rajkumar Buyya, emailed me to let me know that there is a deficiency with my article. He wanted to let me know that Alchemi is now a team effort. Per Dr. Buyya:
Alchemi was designed, developed, and implemented by a team of researchers, primarily Akshay Luther, Krishna Nadiminti, Rajkumar Buyya, from the Melbourne Grid Computing and Distributed Systems (GRIDS) Laboratory over the past four years.
More information here.
7/12/09 Update: Updated link due to Alchemi site moving.
10e65a68-cbca-4d83-8082-ba7e618615a8|0|.0
Here is a link to my .NET Developers Journal article that I mentioned
here.
1db6a378-8ff1-46eb-91e6-7b9f67686ae8|0|.0
For those of you interested in F# or grid computing, check out my article in the May issue of .NET Developers Journal. The article, starting on page 18, describes the process of grid enabling an application written in F#, a new meta programming language developed by Microsoft Research. Using an example of Pi calculation to the nth digit, the article demonstrates the parallel processing of an algorithm discovered by Fabrice Bellard. Alchemi, an open-source.NET framework, is used as the grid computing platform. Also discussed in the article are some of the differences between F# and C# as well as their corresponding reasons.
7/12/09: Updated links
9c5693a3-b433-4713-94d1-9ac76e823ef4|0|.0
Interested in F#? NO! Not the same as G flat! F# is a pragmatically-oriented variant of ML that shares a core language with OCaml. F# programs run on top of the .NET Framework. Unlike other scripting languages it executes at or near the speed of C# and C++, making use of the performance that comes through strong typing. Unlike many statically-typed languages it also supports many dynamic language techniques, such as property discovery and reflection where needed. F# includes extensions for working across languages and for object-oriented programming, and it works seamlessly with other .NET programming languages and tools.
Now are you interested? Head on over to “the Hub” - THE place for F#! Founded by optionsScalper, the Hub is a great place for F# Articles, blogs, forums, code, galleries, etc.
7/12/09: Link updates
b67ec701-c0d9-4257-a980-3b6d52a924fc|0|.0
Thanks to Eric Wise for pointing me to this great article on .NET Design. I just ordered the book from Amazon!
b4a47b5b-7094-437f-a269-57cabddfb715|0|.0
I was asked again today how to draw "translucent" stuff in .NET (GDI+). My response was "Use the
Alpha channel." Noting that this was not the first time I had been asked about this, I thought a brief explanation here was appropriate. From Wikipedia:
The value of alpha in the color code ranges from 0.0 to 1.0, where 0.0 represents a fully transparent color, and 1.0 represents a fully opaque color.
In .NET the range of the value is in byte form (0-255), with 255 representing 1.0. Thus there are 256 alpha channel settings. When drawing, one can adjust the value of the alpha channel to allow other colors to show through.
private void pictureBox1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(255,Color.Yellow)), new Rectangle(50,50,100,100));
e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(150,Color.Blue)), new Rectangle(0,0,100,100));
}
This simple example draws two boxes in a picturebox. The point at which they intersect makes a kind of green. This is due to the alpha channel setting of 150 on the blue box. This is a simplistic overview since alpha channels can be used for dialogs, images and a few other things. Watch for more on alpha channels in the future.
b1243653-3a2c-41ac-b612-784da6c7c916|0|.0
Scoble interviews Scott Isaacs!!! (No not our Scott Isaacs). He feels the same way about AJAX as I do. Nothing new except the name.
e018e0ef-2b9f-4721-b66b-ecbdea4d102d|0|.0
After receiving a lot of comments and email on my
ADO.NET post, It's obvious I didn't explain myself very well. The real question is how do we maintain schema abstraction.
"By this I mean that we use methods like GetStudy(int StudyID) in a class called DataDB instead of a method called SelectByID(int id) in a class called TblStudiesBase." We want to have most, if not all of these methods in a single class. That way the developer only has to instantiate a single object to interact with the data. They need to know virtually nothing about the schema. The problem comes in when you add new developers to the team. They say "Hey there's no FindStudy(int StudyID)" so they add it. But the same code already exisits as GetStudy(int StudyID). While I agree that as a Team lead it's my job to oversee and review the new developers work, it's time consuming reviewing everthing the new developer has done. I've been thinking of doing something like this to keep things a bit more organized:
using System;
using System.Data.SqlClient;
namespace MyCompany.MyApplication.Data
{
public abstract class DAL
{
protected SqlConnection m_conn;
protected DAL(SqlConnection conn)
{
m_conn = conn;
}
public abstract object Get(int id);
public abstract void Set(int id, object data);
public abstract void Remove(int id);
}
public class StudiesDAL : DAL
{
public StudiesDAL(SqlConnection conn): base(conn){}
public override object Get(int id)
{
// TODO: do the get on studies
return null;
}
public override void Set(int id, object data)
{
// TODO: do the set on studies
}
public override void Remove(int id)
{
// TODO: do the remove on studies
}
}
public class MeasurementsDAL : DAL
{
public MeasurementsDAL(SqlConnection conn): base(conn){}
public override object Get(int id)
{
// TODO: do the get on measurements
return null;
}
public override void Set(int id, object data)
{
// TODO: do the set on measurements
}
public override void Remove(int id)
{
// TODO: do the remove on measurements
}
}
public class DataDB
{
protected SqlConnection m_conn;
public StudiesDAL Studies = null;
public MeasurementsDAL Measurements = null;
public DataDB()
{
m_conn = new SqlConnection("SOME_CONNECTION_STRING");
Studies = new StudiesDAL(m_conn);
Measurements = new MeasurementsDAL(m_conn);
}
}
}
Comments?
5d62aacf-4917-41ac-9030-6418d0cd8eb4|0|.0