Tiernan OTooles Programming Blog

code and programming stuff from the hairy bloke!
Moving my Software blog elsewhere
Ok. due to the fact that it is a pain to be running many blogs all over the place, i have decided to move my software blog to my main site. So, from now on, check out my main site for posts.
Why .TEXT for my main Blog?
Why am i trying to move my main blog to .TEXT? Well, simplet. programmability. plus, i can play with it since its written in C# and see if i can break or make better .TEXT. just for the laff. watch this space, or my other blog for more.
Testign part 2
If this works, it means nothing really, but i have managed to build a .TEXT blog posting app. could be handy if i move my main blog to .TEXT, which i am thinking about... Ok. the last test failed because i had the text boxes mixed up and the content went into the title, and vice versa. anyway, hopefully this works...
thinking of a new app, but thinking problems are there...
Ok. I am thinking of a new blogging app, but i dont know what to do with it yet. it will be a desktop blogging application, and i dont know weather do use SQL Server Express or XML. SQL Server Express has some major advantages over XML, but XML has its advantages too. So, the advantages of SQL Server are:
Speed: Very fast for queries
Managability: Single file with the DB in it.
Support: Fully supported by the .NET Framework, and its SQL too.
Ease of programming: Because its SQL, its a lot easer to program for, and it ties directly in with the .NET frame work and IDE.

Disadvantages:
Size: Ok. my app could be up to a meg is size, maybe a little more, but i have to get the .NET framework 2.0 and SQL Server Express to the users machine. I know the .NET 2.0 boot strapper could help, but its still a hefty download for the users, and if its only a 1 or 2mb file, some are just not going to download!

I cant think of any other disadvantages to SQL Express, but if you have any tell me!

when it comes to XML, the only advantage of XML is the size of it. Its basicly the oppisite to SQL Server Express. i know i can write and read XML with the Dataset, but i still have to do some code to find stuff i want in there, and theres no real Query Language for data sets. So, its really a toss up between size and speed (etc). What would you choose?

Posted: Sep 17 2004, 11:51 PM by tiernanotoole | with 2 comment(s)
Filed under:
URL Coralizing App

Ok. this is really a stupid little app i just wrote for the laugh, but i will post the code here becuase i can. First check out this post on my other site about coral. and now the code.

Try
   Dim split2 As Array
   split2 = Split(TextBox1.Text, "/")
   TextBox2.Text = split2(0) + ".nyud.net:8090/"
   
For i As Integer = 0 To split2.Length - 1
      
If i = 0 Then
      
ElseIf i = 1 Then
         
TextBox2.Text = TextBox2.Text & "" & split2(i)
      
Else
         
TextBox2.Text = TextBox2.Text & "/" & split2(i)
      End If
   Next
Catch ex As Exception
   MsgBox(ex)
End Try

So, the form is set out like this. 2 text boxes (TextBox1 and TextBox2) and a Button. code is for the button1_click event. You put a url into textbox 1, and the click the button and the Coralized URL comes out in Textbox2. you do not use a http:// infront of the URL as it will break the theory behind the code. This is a stupid little app, but i had to do it cause i havent posted here in a while!

Posted: Aug 29 2004, 04:47 AM by tiernanotoole | with 1 comment(s)
Filed under:
NO MORE INVITES
I, and a lot of people, have not been given any more invites for quite some time now. people posting comments here and emailing me asking for invites are wasting their time! i dont have any, and as i said before, if i get them, they will go on freegmailinvites.com. Now, leave me alone!
Posted: Jul 21 2004, 02:47 PM by tiernanotoole | with no comments
Filed under:
my main blog could be moving to .TEXT
Ok. i have been using different weblog software over the last while now. First i used Movabletype, but it was too big and took up lots of resources. then i moved to Wordpress. this rocks and im still using it, but now im looking at .TEXT. Its written in C#, has a web service back end, and just rocks. im using it here on weblogs.ASP.NET but now im looking at running it at home. I'll be posting my progess here soon. I talked a bit about it on my other blog last night. Ohhh, and speaking of blogs, RSSAgg has died. not sure why. remote debugging is off, so i cant see from work. ill check it when i get home.
Posted: Jul 05 2004, 11:18 AM by tiernanotoole | with 1 comment(s)
Filed under:
Code for RSSAgg

Ok. yesterday i said i would post some code for RSSAgg, and here it is. Im only going to post some little bits because im lazy, but they are the important parts so here it goes:

Firstly theres a function which does all the hard work. this gets data from the RSS Feeds and returns a dataset to the sub that called the functions:

    Public Function getdata() As DataSet

        Dim myDS As New DataSet ' the dataset

        Dim rsstable As New DataTable ' datatable that gets imported into the dataset

        Dim datecol As New DataColumn("Date") ' the date colum.

        datecol.DataType = System.Type.GetType("System.DateTime") ' set the type of data in the date colum to datetime

        rsstable.Columns.Add(datecol) ' add the date column to the table

        rsstable.Columns.Add(New DataColumn("Title")) ' add a new title colum to the table

        rsstable.Columns.Add(New DataColumn("description")) ' add a new title colum to the table

        rsstable.Columns.Add(New DataColumn("link")) ' add a new title colum to the table

        rsstable.Columns.Add(New DataColumn("channel")) ' add a new title colum to the table

        rsstable.Columns.Add(New DataColumn("chanurl")) ' add a new title colum to the table

        Dim array As New ArrayList 'array of sites your to connect to

        array.Add("http://feeds.feedburner.com/blogspot/hnKu") ' links blog

        array.Add("http://blog.lotas-smartman.net/feed/") ' main blog

        array.Add("http://weblogs.asp.net/tiernanotoole/Rss.aspx") ' dev blog

        Dim x As Integer ' counter

        For x = 0 To array.Count - 1

            Dim feed As Rss.RssFeed = Rss.RssFeed.Read(array(x))

            Dim channel As Rss.RssChannel = feed.Channels(0)

            Dim i As Integer

            For i = 0 To channel.Items.Count - 1

                Dim myrow As DataRow

                myrow = rsstable.NewRow

                Dim item As New Rss.RssItem

                item = channel.Items(i)

                Dim mydate As Date

                mydate = item.PubDate

                myrow("Date") = mydate

                myrow("Title") = item.Title

                myrow("description") = item.Description

                myrow("link") = item.Link

                myrow("chanurl") = feed.Channels(0).Link

                myrow("channel") = feed.Channels(0).Title

                rsstable.Rows.Add(myrow)

                rsstable.AcceptChanges()

            Next

        Next

        myDS.Merge(rsstable)

        Return myDS

    End Function

As you can see, i kind of got board with the comments after a while. Now, then you have the page load sub:

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim cached As String = ""

        Dim ds As DataSet = Cache("RSSds")

        If Not ds Is Nothing Then

            cached = "Dataset cached"

        Else

            Dim ws As New rssAgg.RSSAggWS

            cached = "Dataset not cached"

            ds = getdata()

            Cache.Add("RSSds", ds, Nothing, DateTime.Now.AddMinutes(30), TimeSpan.Zero, Caching.CacheItemPriority.Normal, Nothing)

        End If

        ds.Tables(0).DefaultView.Sort = "date desc"

        Repeater1.DataSource = ds.Tables(0).DefaultView

        Repeater1.DataBind()

    End Sub

the variable "cached" used to be written out to show you if it was cached or not. now. some important things that are needed. Firstly you need RSS.NET. Not only that but you need to modified the code because of a date time problem with it. the info is in Bug 927898. i put in the code and it works grand now. currently its only parsing RSS2.0, or mainly RSS2.0 feeds, but RSS.net will do other RSS Feeds too. i might work on atom support, but not for a while now. Next task: SQL server for the back. the plan is to query the feeds every 15 or 30min and put the data into a SQL Server. then when the page is loaded, the page queries the DB and recives only the last 10 or 20 results. we will see later though! That could be a 0.2 alpha release. i might have an RSS feed for RSSAgg in at 0.15? keep checking back!

Posted: Jul 03 2004, 04:26 PM by tiernanotoole | with 1 comment(s)
Filed under: ,
RSSAgg 0.1 Alpha online!

check out the new release of RSSAgg! its back after some down time. hopefully all will go well. code some time tomorrow. not sure when though. stay tuned! :P

Posted: Jul 02 2004, 09:17 PM by tiernanotoole | with 1 comment(s)
Filed under:
RSSAgg: An update
Ok. sorry for the lack of posts about RSSAgg over the last while. I have been quite busy with different things and havent gotten a chance to play with RSSAgg. I have to fix a machine on my network, which was hosting most of my sites, now is now dead, and my workstation si doing most of the hosting. Thats being explained more here. Anyway, i hope to have RSSAgg working again soon. Textamerica, the moblog people, are working on RSS Feeds again. once that is up, ill be posting a lot more photos on the blog! Anyway, sorry again. a new build and code may be up soon!!
Posted: Jul 02 2004, 08:54 AM by tiernanotoole | with no comments
Filed under:
More Posts Next page »