What if the worst happens?

I see a lot of companies rush, rush, rush and push, push, push to get things in fast. They want to deliver new features every second if they could. However this has big risk and future problems they keep coming. I always say Prepare for the Worst and Hope for the Best!

This I find is the best saying to use, whenever you think ‘should I just do this little thing or not’. If you ever look at a problem and think something could go wrong here then put in a worst case solver.

Some of the trip ups I have see have been to do with logging, which can either be to little or even to much. You can always do with logging to save you in the live environment. When issues start happening you need to diagnose what the issue is straight away, but you can’t get the details without some logging as to what is going on.

However you should only log the things that could fail, but of course shouldn’t be. An example is, I have created a method that actions dynamic changes on multiple elements, but if one element is removed I don’t need to know about it. I just need the method to continue running, so I could put a try catch round it and then let it go with no logging. This prepares for the worst and then lets the best happen. However If I have built a method that the application needs all elements to be present, then I want to log the error for reporting so it can be fixed as soon as it is seen.

There has been sometimes that someone has added masses of logging at every section, then the server starts throwing warnings up or just falls over. So your best is that the program works as you need, but your worst preparation is you have logging to review any errors. You then also have the best prepared with as much useful logging for review as you need and also the worst is you don’t put in unnecessary logging. There is always a balance between too much and too little that needs to be looked at.

Something logging and other attributes can do is take up memory. This can then build up and take down servers, as I have recently also found. I deployed a nice new OSB service and added one new log that would be fired each time someone submitted the form. This to me didn’t seem much as it was a small file, but then once it was live there was a report about the logging from the support team. Although it was a lot of logging that could build up over time, it was also not helped that the server was full 95%. This means it could fill up at any point.

If you are going to have a well organised and dynamic server, then there should be scripts run daily or monthly that clear up the files. This could either delete the logs older than X number of days or even just package them and send to another locations. It is super risky to be running a server at 95% full and expect nothing to tip it over the edge. Regular maintenance and checks should be carried out so that this is caught at the first site.

One that all developers should be using is a good old Try Catch. If you are not sure what one is, without being too patronizing, it looks like this in JavaScript for example:

try {
//Code attempted
}
catch(ex){
//Exception caught
}

You should use these anywhere there could a potential break even if you want something to react to it or not. For example you would put one round a submission from a form. This would then catch if it failed and for what reason, then from this you could display a notice informing the user what to do next. You could also do it for example if you are dynamically loading content in a loop, you could put one round the code within the loop. If one of the calls to get content fails it could trip over the Try Catch, but then continue getting the rest of the content. The user then need not know that something went wrong and then you can either send an error message to support or just let it continue.

These can be really helpful to stop your application from breaking in unwanted ways like with server errors, but again you don’t want to over use them and you want to be sure they errors are being picked up.

Another method to get around the errors cropping up is putting default values. I stepped into this one when someone create a switch statement, but with no default case (C#) and the variable that was being set inside was set to null at the beginning. This was working fine for some time as the cases that were there met the demand, but further down the line the content editable variable that was being checked in the switch had changed. This meant that the variable being returned was null and breaking the application.

To get around this you should first try to make the check dynamic or dynamically changeable, so when a new value is added then the new result can also be generated. The other thing that should always be done with Switch statements or any other kind of statement that provides the option, is put a Default. Example:

Switch (Number){
Case 1:
//Do thing
Break;
Case 2:
//Do this
Break;
Default:
//Or else do this then
Break;
}

It just means that there is a result from the statement no matter what. At best, unlike this scenario, if you are setting a variable in the statement you should always return a valid result and then handle the result. For this instance an empty string could have been returned and all would have worked fine.

These are some of the ways developers can prepare for the worst and stop stupid mistakes. If you have seen any silly things happen that could be avoided then comment below with what, why and most importantly how to fix it.

 

MS Word special characters Regex

That pesky Microsoft! They have to be different and mess us developers around don’t they. Have you ever noticed that Microsoft Word’s symbols look a bit different or act a little odd? Well it’s because they are not the standard char characters. This can be a pain for Regex and other things. So how do you get them…

The reason they are so difficult is they use Windows-1252 character encoding set which are not represented in ASCII or ISO-8859-1. This is what just about everyone doesn’t do of course. These characters include:

  • … ellipsis
  • ‘smart’ “quotes”
  • en – dash and em — dash
  • dagger † and double dagger ‡

There are few more of course, but these are the most common few that come up. You can find more of Microsoft Word Windows-1252 character encoding here.

 

Symbol Encoding
single quotes and apostrophe \u2018\u2019\u201A
double quotes \u201C\u201D\u201E
ellipsis \u2026
dashes \u2013\u2014
circumflex \u02C6
open angle bracket \u2039
close angle bracket \u203A
spaces \u02DC\u00A0

 

Here is a pre-built method for JavaScript and C# to combat these.

 

JavaScript Clean String

var wordClean = function(text) {
var cleanStr = text;

// smart single quotes and apostrophe
cleanStr = cleanStr.replace(/[\u2018\u2019\u201A]/g, “\'”);

// smart double quotes
cleanStr = cleanStr.replace(/[\u201C\u201D\u201E]/g, “\””);

// ellipsis
cleanStr = cleanStr.replace(/\u2026/g, “…”);

// dashes
cleanStr = cleanStr.replace(/[\u2013\u2014]/g, “-“);

// circumflex
cleanStr = cleanStr.replace(/\u02C6/g, “^”);

// open angle bracket
cleanStr = cleanStr.replace(/\u2039/g, “<“);

// close angle bracket
cleanStr = cleanStr.replace(/\u203A/g, “>”);

// spaces
cleanStr = cleanStr.replace(/[\u02DC\u00A0]/g, ” “);

return cleanStr ;
}


C# Clean String

public string wordClean (string text){
var cleanStr  = text;

// smart single quotes and apostrophe
cleanStr  = Regex.Replace(s, “[\u2018\u2019\u201A]”, “‘”);

// smart double quotes
cleanStr  = Regex.Replace(s, “[\u201C\u201D\u201E]”, “\””);

// ellipsis
cleanStr  = Regex.Replace(s, “\u2026”, “…”);

// dashes
cleanStr  = Regex.Replace(s, “[\u2013\u2014]”, “-“);

// circumflex
cleanStr  = Regex.Replace(s, “\u02C6”, “^”);

// open angle bracket
cleanStr  = Regex.Replace(s, “\u2039”, “<“);

// close angle bracket
cleanStr  = Regex.Replace(s, “\u203A”, “>”);

// spaces
cleanStr  = Regex.Replace(s, “[\u02DC\u00A0]”, ” “);

return cleanStr ;
}


If you are doing some validation using Regex, here is also how you can check these characters.

JavaScript Regex

function containsWordChar(text) {
var contains;

switch (text) {

case (text.match(/^[\u2018\u2019\u201A]$/)):
contains += “single quotes and apostrophe, “;

case (text.match(/^[\u201C\u201D\u201E]$/)):
contains += “double quotes, “;

case (text.match(/^[\u2026]$/)):
contains += “ellipsis, “;

case (text.match(/^[\u2013\u2014]$/)):
contains += “dashes, “;

case (text.match(/^[\u02C6]$/)):
contains += “circumflex, “;

case (text.match(/^[\u2039]$/)):
contains += “open angle bracket, “;

case (text.match(/^[\u203A]$/)):
contains += “close angle bracket, “;

case (text.match(/^[\u02DC\u00A0]$/)):
contains += “spaces, “;

default:
contains += “double quotes”;

}

return contains;
}


C# Regex (MVC)

[RegularExpression("^[\u2018\u2019\u201A\u201C\u201D\u201E\u2026\u2013\u2014\u02C6\u2039\u203A\u02DC\u00A0]+$", ErrorMessage = "Your content contain some Microsoft Word Windows-1252 character encoding.")]


C# Regex

Public string containsWordChar(text) {
String contains;

switch (text) {

case (text.IsMatch(@”^[\u2018\u2019\u201A]$”)):
contains += “single quotes and apostrophe, “;

case (text.IsMatch(@”^[\u201C\u201D\u201E]$”)):
contains += “double quotes, “;

case (text.IsMatch(@”^[\u2026]$”)):
contains += “ellipsis, “;

case (text.IsMatch(@”^[\u2013\u2014]$”)):
contains += “dashes, “;

case (text.IsMatch(@”^[\u02C6]$”)):
contains += “circumflex, “;

case (text.IsMatch(@”^[\u2039]$”)):
contains += “open angle bracket, “;

case (text.IsMatch(@”^[\u203A]$”)):
contains += “close angle bracket, “;

case (text.IsMatch(@”^[\u02DC\u00A0]$”)):
contains += “spaces, “;

default:
contains += “double quotes”;

}

return contains;
}

 

CMS for everyone, but is it for you?

WordPress , bespoke CMS, Square Space and loads more, but what type is the best and which is worst to use? When you are shopping for a website or you are an agency looking to build websites, the two questions are what language you want it to be built in and what CMS method do you want to use? This can determine who you hire, what your limitations are as a design company and the future of your work.

The three case studies I will use to explain are WordPress as the open source CMS, a Bespoke built CMS as of course the bespoke  CMS and finally Square Space as the middle man, which I will explain why later. These I feel represent the three different type of CMS systems you can have and can also work for different people. I relate the bespoke one to Linux as the open source built CMS which the user builds what they want, WordPress to Windows as a slightly open source CMS that you can customise and develop. I then see Square Space as Apple as they are an all in one package with the CMS, plugins and support.

Let’s go with first the worst, which is WordPress. A lot of people will disagree with this, but I still stick by that WordPress doesn’t work well. Though I will point out I don’t think it works well for big companies unless they hack it, but well for the little guy. WordPress is a template open source system that is built off of open source plugins. This is against my belief of the Apple template to build, control and maintain all. When you let others hack into your code it makes it messy and can make more future problems.

You can install WordPress for free and easily, then choose a template, so far so good. Then you start entering data into the fields required, again so far so good. Then… you add plugin features, to be met with the issues of either the plugin doesn’t work, doesn’t work with your template, doesn’t work with the other plugin you have installed. You are in a sense asking two developers to make their plugins work with each other, but without talking or seeing each other. They then can’t know what will conflict in the code and what will work. They may pull it off as they are great coders and make it self contained, which is great but then your head tag can become 200 lines long.

When they do the plugins well, and not well, they have to call in their own code files. This can result in you having 10 JQuery files called in, plus other files, plus images, plus tracking. This is all on top of what WordPress has already put in and what your template has already put in. With all of these files your website can become so heavy that it breaks the speed scales. If you put your WordPress website on the Google Page Insights website how well would it do.

However I do see the light for WordPress and the improvement over the past few years. They have gone leaps and bounds from when I last used it, so there could be hope for them yet. This is also due to the demographic, with more people becoming self employed and wanting their own company, they need websites to be in the digital age. These companies though don’t have money and bing there is WordPress. This is a great system for small and quick companies wanting to be in the digital market, with a fully managed, up to date technology and great design system. Other people are Blogs, Portfolio plus other small type of site.

//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js

(adsbygoogle = window.adsbygoogle || []).push({});

On the other side of the river is a bespoke CMS. This would be freshly made by the company that is using it and be made for them. By this I mean that they would import what plugins they need, with any functionality, design and flow that works for them. Some creative agencies also go for this as they can keep putting new advancements into the CMS and then optimise the code. This is a great way to have control of the code as unlike the others you can upgrade all of the CMS as and when you need it. You will then also be able to fully support the system as you are not relying on another company to update it. If you are a bigger company or you just have money then you can pay for a user testing team to go through the whole CMS, but if you don’t then you are the user tester. Either yourself or your client will unofficial be the user tester when you use the system and find anything wrong then it’s reported.

This is where the con’s for this start. You do not ever have a finished product as you are consistently developing or fixing existing issues, where as systems like WordPress will have it 100% solid before release. This can also be the part that slows down development, because if you are caught always support the CMS you can’t improve it. With a template CMS the system would be fully tested and then you will have a community of users bug testing and sending out updates.

The last type of CMS I have used of course and see is Square Space. This I feel is bit more of an in between system as it has the open source model and the locked down feels as well. The templates you use are limited to only from Square Space itself, which gives you confidence that they work perfectly on the platform. They would be fully tested and checked over before going live so then you have confidence in the templates. This also goes for the plugins and tools you can use within the website. There are plenty of options like Amazon affiliates, forms and carousels that are all solidly built into the platform and the template. You can then start by injecting code into the head, footer and each individual pages so you can add analytics, AddThis and other plugins or specific CSS. This can then be expanded if you are  confident by opening up the developer mode in the settings. With this you can use SFTP access to download the template files and therefore customise the layout to what ever you want, but be careful as you don’t want to break the website. So far I have not see a need to open up the files yet as everything I wanted to do has been in the template. I think that this platform gives you all the flexibility and control of both type of CMS platforms. You have the control and flexibility of a bespoke systems, but also the solid testing, pre built system like WordPress.

With any system there are some pit falls but I think there are less with this platform that are that bad. Things like, you are limited by the template options, so if you don’t know code then you will have to have the templates how they are. This isn’t to bad as they are really good templates, but they are not made for you so you won’t be able to get that side bar where you want it for example. Though if you don’t know code then you wouldn’t be able to do anything with the other systems as well. I have also ran this website through the Google page insights, which it wasn’t bad on the desktop but the mobile was. The errors that came up are things like compress files, but I don’t have access to these files even in developer mode. They give you access to the template file, but not the systems files which is where the problems are. With other systems you would normally have access to improve the code side of the website.

//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js

(adsbygoogle = window.adsbygoogle || []).push({});

I used to be fully against template websites and the systems, but I have converted to Square Space. It has enough flexibility but also the security. When I had the bespoke CMS I was doing more development fixes and systems checking over than I was putting great content on. This is why I then looked for another CMS systems, but you can’t get the back end with out the front end, which is a shame. I then looked to WordPress, but I still think even though it has came a long way since I last used it, there is still a big issue with using plugins and templates with each other.

I would suggest the best method is bespoke as you have full control over what you are using and getting, but you would need to make sure you have a systems that is 100% strong and tested like the template CMS. If you can’t afford or do not want a bespoke systems then I would suggest Square Space as this will still give you that flexibility but with the security of a template. Finally I wouldn’t suggest WordPress unless you have the time to make sure all plugins will work together.

Please use the commenting system to tell everyone your experiences or even if you use another systems that can compare?

//e.infogr.am/js/embed.js?6sf

Better to be specified

Are you a master at one or are you good at all? I am asking this question to see if developers want, need and like to be a master at one topic or if they think it would be better to be multi talented.

Just a quick background blurb of why I question this. I started at a small company, where I was taken on as a web developer. I started to learn all areas of this area including not just ASP.NET, HTML, and CSS,  but also server set-up, maintenance, e-shots, cocoa touch and SEO plus more. So I was an all rounder at the web development, then I moved to A larger company. I was taken on as a back-end developer as I thought I would like to specify in the ASP.NET language. However when I started to show I could cover most other roles, I have taken on more responsibility of all the areas. So I am now an all round developer again and this then brings me on to if it is better and also who for.

The great thing about this subject is it can apply to any type of job, as we all have the same decision.
The all rounder

How is it for us

To be an all round kind of worker you have got to work much harder due to the amount of things you need to know to be great. For my application I need to know HTML, CSS, JavaScript, ASP.NET, servers and some other languages just in case like PHP plus more!. To keep this up is hard, but is it worth it? I have found I have gained more respect and knowledge by covering all these areas as people know they can come to me for that knowledge, advice and decisions. It also, with my line of work, brings the overall project together. I can see how a website needs to be built for the server set up, front end, back end and then maintenance. For example if it needs optimisation then I know where it would be best to shave off load time in what sections and how it would affect the other sections.

Job prospects become hard though as an employers wants the best of the best, but with out killing off all social life and fun, you can’t know everything. Especially as much as someone who is religiously learning one section constantly.

This can also become a problem when  you can mange all areas, then you need to work all areas. You would need to be invoked in every project, while also delivering results like you are working on one project. It is like taking a bite from multiple apples at the same time, possible but very very hard.

What the client thinks

WINNING… Well they might be depending on how good you are, but then again they probably still will be even if you only have a little knowledge in most areas. You should have a basic understanding of what ever the other subjects are, so for example I am a front end developer, but I have a basic understanding of back end. This still gives the employer an advantage as you understand basically how they work together and can appreciate the work going on in the other sections.

If you are close to master at most areas then bingo. They then have someone who can make, create and manage all their areas of work, so if one person is off you can cover all and hopefully very well. This also can become new avenues, like I know Objective C with COCOA Touch for iOS APPs which my employer is not currently doing. Therefore I could be the growth of the company which is of course is in the interest of the company.

Overall

If you don’t mind working your ass off then, you can become great and go far in this type of role. You can cover all areas and therefore would make a great team leader or manager as you can support the whole team. This also gives you safety for if they cut areas of the company or team then you can easily transfer.

It works for the employer, but if you want the best of the best then this is not going to work. You can only learn, listen and become great at one thing, but good at multiple things.

I think this kind of role is best for small companies that need to pay less and get more, though that can work for both parties.
Master of one

For us

Becoming the Yoda of a subject is the best thing ever. If you can become so valuable in that subject then everyone will want you. You can then move to the top of the food chain and teach all the others. Employers would want you in their company as you can produce the best work, but there are some pitfalls.

You may be the best, but there is always some one better and new information being release, so you can’t just relax. You would still need to work as hard as you can to keep up the top and be competitive to others like yourself, which can be harder as it is harder competition.

Being in this role may make it harder as well to understand how other areas work together. In all though it does reduce the amount of things you have to learn and worry about so you can concentrate more.

For client

WINNING… And again the client wins. They have a hard working, determined and great employee that is a master at just the subject they want. If they need anything to happen in that line of work, then you are the go to person. This, in their mind, would secure your job as you are a required asset. They would hope that with your knowledge they can gain the advantage to push their business to the next level and surpass others. You would know what is best to go with at current and future, so why would it be bad.

The problem would lie that they can only rely on you for that area of work. If they need a section fixed and that guy is out then your amazing skill turns to nothing. This will then start the cogs in the employers mind, what if we had an all rounder? How beneficial is this person?

Overall

In the end you are the master and you can become valuable to the employer, so it is probably the best way for you and the employer. It would be less stress for you and also more fun, as you can become a guru. Then employer will be happy as you can do the job not just well, but very well. Though you have to make sure you are required all the time or questions could pop up.

Summary

Not the ending you want, but it’s up to you. In the end it always does.

You have to decide if you want to be the all rounder and have a whole bank of knowledge or if you want to be the master with amazing knowledge in one area.

Set up your dynamic Hootsuite Account

Hootsuit offer a feature to set up a RSS feeds that will then be read by their systems to be posted on the desired social media. This is how to set it up correctly from beginning to end, plus I will show how you can do it in the VB.NET language.

First thing of course is to set yourself up a Hootsuit account at http://www.hootsuit.co.uk. Once you have this set up and your desired social media you can begin with the real work.

The RSS feed is created like any other RSS feed with the standard nodes, which I have outlined below. The trouble comes with knowing what to enter in these fields. Below with the RSS example I have entered in what content should be placed in the nodes and then an example of the data.

Before the example you need to know what a RSS feed is. A RSS feed is XML with a structure that is standard lay known, so when people say RSS feed you know the exact nodes you need. Each <node> is called a node and is what the reader will look for to know what information they are looking for, as an example if it is looking for the title the node this would be <title>information<title>. For more information about what RSS feeds are got to http://en.wikipedia.org/wiki/RSS

//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js

(adsbygoogle = window.adsbygoogle || []).push({});

RSS feed example with descriptions:

<rss xmlns:atom=”http://www.w3.org/2005/Atom&#8221; version=”2.0″>

    <channel>

        <atom:link href=”[LINK FROM WHERE THE RSS FEED IS COMING FROM]” rel=”self” type=”application/rss+xml”/>

        <title>

            [TITLE OF THE FEED]

        </title>

        <link>

            [WEBSITE LINK]

        </link>

        <description>

            [DESCRIPTION OF FEED]

        </description>

        <lastBuildDate>

            [DATE TIME OF REQUEST (in format)]

        </lastBuildDate>

        <copyright>

            [COPYRIGHT INFOMATION]

        </copyright>

        <language>

            [LANGUAGE ENCODING (English = en-gb)]

        </language>

        <webMaster>

            [MASTER CONTACT]

        </webMaster>

        <item>

            <description>

                [THIS IS YOUR POST ( max 140 character count for twitter)]

            </description>

            <link>

                [LINK TO ITEM]

            </link>

            <guid>

                [UNQUIC LINK IDENTIFIER (I add guid key on the end of the link to make it unquie)]

            </guid>

            <pubDate>

                [DATE THIS WAS PUBLISHED]

            </pubDate>

    </item>

    </channel>

</rss>

 

RSS feed example with content:

<rss xmlns:atom=”http://www.w3.org/2005/Atom” version=”2.0″&gt;

    <channel>

        <atom:link href=”http://www.purerandom.co.uk/rss/social_rss.ashx” rel=”self” type=”application/rss+xml”/&gt;

        <title>

            Pure Random social RSS Feed

        </title>

        <link>

            http://www.purerandom.co.uk/

        </link>

        <description>

            Pure Random social RSS Feed – A lot of Random posts and products that will keep you hooked for hours.

        </description>

        <lastBuildDate>

            Fri, 12 Sep 2014 12:01:06 GMT

        </lastBuildDate>

        <copyright>

            2014 Pure Random

        </copyright>

        <language>

            en-gb

        </language>

        <webMaster>

            info@purerandom.co.uk (Pure Random)

        </webMaster>

        <item>

            <description>

                Why not have a look at Pure Random – The web developer freelance quick tips | Pure Random

            </description>

            <link>

                http:/www.purerandom.co.uk/the-web-developer-freelance-quick-tips?utm_source=SocialMedia&amp;utm_medium=autopost&amp;utm_campaign=AutoSM

            </link>

            <guid>

                http:/www.purerandom.co.uk/the-web-developer-freelance-quick-tips?utm_source=SocialMedia&utm_medium=autopost&utm_campaign=AutoSM?gu=12525

            </guid>

            <pubDate>Fri, 12 Sep 2014 12:01:06 GMT</pubDate>

        </item>

    </channel>

</rss>

 

You will need to make this feed dynamically for the information you wish to post, so for PureRandom I have used the asp.net framework as this is my primarily web language. However you can use anything that can write out an XML feed. I have outlined below how you produce a dynamic RSS feed for your data in VB.NET(Visual Basic).

VB.NET Example:

Public Shared Sub Generate_RSS()

        context.Response.ContentType = “text/xml”

        Dim RSS_SQL As String = “SELECT * FROM RSSfeed”        

        Dim RSS_DS As DataSet = db_conn.return_dataset(RSS_SQL)        

        Dim RSS_File As String = “”

        If RSS_DS.Tables.Count > 0 Then

            If RSS_DS.Tables(0).Rows.Count > 0 Then

                Dim BuildDateTime As datetime = Datetime.now

                RSS_File = “<?xml version=’1.0′ encoding=’UTF-8′?>” & Chr(13)
                RSS_File &= “<rss version=’2.0′ xmlns:atom=’http://www.w3.org/2005/Atom&#8217; >” & Chr(13)
                RSS_File &= “<channel>” & Chr(13)
                RSS_File &= “<atom:link href='” & HttpContext.Current.Application(“site_root”) & “rss/social_rss.ashx’ rel=’self’ type=’application/rss+xml’ />” & Chr(13)
                RSS_File &= “<title>” & HttpContext.Current.Application(“company_name”) & ” ” & form_type & ” ” & RSS_Type & ” RSS Feed</title>” & Chr(13)
                RSS_File &= “<link>” & HttpContext.Current.Application(“site_root”) & “</link>” & Chr(13)
                RSS_File &= “<description>” & HttpContext.Current.Application(“company_name”) & ” ” & form_type & ” ” & RSS_Type & ” RSS Feed – ” & page_save.get_Meta(“meta_description”) & “</description>” & Chr(13)
                RSS_File &= “<lastBuildDate>” & Convert.ToDateTime(BuildDateTime).ToString(“r”) & “</lastBuildDate>” & Chr(13)
                RSS_File &= “<copyright>” & Date.Today.Year.ToString & ” ” & HttpContext.Current.Application(“company_name”) & ” </copyright>” & Chr(13)
                RSS_File &= “<language>en-gb</language>” & Chr(13)
                RSS_File &= “<webMaster>” & HttpContext.Current.Application(“email”) & ” (” & HttpContext.Current.Application(“company_name”) & “) </webMaster>” & Chr(13)

 

                For Each RSS_Row As DataRow In RSS_DS.Tables(0).Rows

                    RSS_File &= “<item>” & Chr(13)

                    ‘Item Title
                    If Not String.IsNullOrEmpty(Title_Field) Then
                        If Not IsDBNull(RSS_Row(Title_Field)) Then
                            If Not String.IsNullOrEmpty(RSS_Row(Title_Field).ToString) And Not RSS_Row(Title_Field).ToString = “-” Then

                                RSS_File &= “<title>” & RSS_Row(Title_Field).ToString & “</title>” & Chr(13)

                            End If
                        End If
                    End If

                    ‘Item description
                    If Not String.IsNullOrEmpty(Description_Field) Then
                        If Not IsDBNull(RSS_Row(Description_Field)) Then
                            If Not String.IsNullOrEmpty(RSS_Row(Description_Field).ToString) And Not RSS_Row(Description_Field).ToString = “-” Then

                                RSS_File &= “<description>” & System.Web.HttpUtility.HtmlEncode(RSS_Row(Description_Field).ToString).Replace(“&”,”&amp;”) & “</description>” & Chr(13)

                            End If
                        End If
                    End If

                    ‘Item link
                    Try
                        If Not String.IsNullOrEmpty(Link_Field) Then
                            If Not IsDBNull(RSS_Row(Link_Field)) Then

                                    RSS_File &= “<link>” & RSS_Row(Link_Field).ToString.Replace(“&”, “&amp;”).Replace(“//”, “/”) & “</link>” & Chr(13)

                            End If
                        End If
                    Catch ex As Exception
                    End Try

                    ‘Item Guid
                    Try
                        If Not String.IsNullOrEmpty(Link_Field) Then
                            If Not IsDBNull(RSS_Row(Link_Field)) Then

                                    RSS_File &= “<guid>” & RSS_Row(Link_Field).ToString.Replace(“//”, “/”) & “?gu=” & RSS_Row(“id”).ToString & “</guid>” & Chr(13)

                            End If
                        End If
                    Catch ex As Exception
                    End Try

                    ‘Item Publish Date (must be fully formatted so to be sure, it is broken down into sections)
                    Dim DateString As String = “”

                    If Not String.IsNullOrEmpty(DateField) Then
                        If Not IsDBNull(RSS_Row(DateField)) Then
                            If Not String.IsNullOrEmpty(RSS_Row(DateField).ToString) And Not RSS_Row(DateField).ToString = “-” Then

                                DateString &= RSS_Row(DateField).ToString & ” “

                            Else

                                DateString &= Date.Today.Date.ToString

                            End If
                        Else

                            DateString &= Date.Today.Date.ToString

                        End If
                    Else

                        DateString &= Date.Today.Date.ToString

                    End If

                    If DateString.Length > 10 Then

                        DateString = DateString.Substring(0, 10)

                    End If

                    ‘Item Publish Hour
                    If Not String.IsNullOrEmpty(sedhour_Field) Then
                        If Not IsDBNull(RSS_Row(sedhour_Field)) Then
                            If Not String.IsNullOrEmpty(RSS_Row(sedhour_Field).ToString) And Not RSS_Row(sedhour_Field).ToString = “-” Then

                                DateString &= ” ” & RSS_Row(sedhour_Field).ToString & “:”

                            Else

                                DateString &= ” 12:”

                            End If
                        Else

                            DateString &= ” 12:”

                        End If
                    Else

                        DateString &= ” 12:”

                    End If

                    ‘Item Publish Minute
                    If Not String.IsNullOrEmpty(sedminute_Field) Then
                        If Not IsDBNull(RSS_Row(sedminute_Field)) Then
                            If Not String.IsNullOrEmpty(RSS_Row(sedminute_Field).ToString) And Not RSS_Row(sedminute_Field).ToString = “-” Then

                                DateString &= RSS_Row(sedminute_Field).ToString & “:00”

                            Else

                                DateString &= “00:00”

                            End If
                        Else

                            DateString &= “00:00”

                        End If
                    Else

                        DateString &= “00:00”

                    End If

                    Dim PostDateTime As DateTime = Convert.ToDateTime(DateString)

                    ‘RSS_File &= “<pubDate>” & PostDateTime.ToString(“r”) & “</pubDate>” & Chr(13)

                    RSS_File &= “<pubDate>” & Convert.ToDateTime(BuildDateTime).ToString(“r”) & “</pubDate>” & Chr(13)                    

                    RSS_File &= “</item>” & Chr(13)

                Next

                RSS_File &= “</channel>” & Chr(13)

                RSS_File &= “</rss>” & Chr(13)

                HttpContext.Current.Response.Write(RSS_File)                

            End If
        End If

    End Sub

Now that you have your feed running you need it to produce a new item in the feed before you tell the Hootsuite system to read the feed. Hootsuite reads the feed every half an hour as I was informed before, but this is not fact. Even though you don’t know the exact time you can generate the new post every half an hour to be safe. You don’t need to produce a new item though if you don’t want to post that frequently.

//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js

(adsbygoogle = window.adsbygoogle || []).push({});

Once you have the feed generating, you can now set up Hootsuite to read the feed when you need it to for the correct social media. Just to mention you can only use two feeds for free. If you want to use this feature for more than two you can get the premium account.

To set the RSS feed up on Hootsuit you can do as followed.

Step 1
Login into your Hootsuite account and navigate to the settings page via the side navigation. Click on the RSS/Atom page and you will then have a popup appear.

Step 2
If you do not already have a RSS feed set up then simply choose the + symbol and add a new feed. If you do already have a feed you want to adapt, then you can edit that feed.

Step 3
Finally fill out all the relevant information below:

  1. Feed URL: the URL of where the RSS feed is generated
  2. Network to send feed items to: This is which social media platform you wish to post to.
  3. Check this feed for new posts every: You can set how many time you want hootsuite to check your feed for new posts.
  4. When new posts are found, send up to: Choose how many post you want to be sent every time they find new post e.g 4 new post but will only send 2 of them.
  5. Include text from post in message: As it is side, this include the text form the post in the message.
  6. Hide link preview on social networks: this prevent social media from showing the previews to the website (suggested to keep it on)
  7. Prepend text to each message: here you can put a standard message so you know it is from the feed. (note that twitter still have 140 character count and this will have to be taken into account)
  8. URL shortener for links: This will shrink the long links, so they fit on the post better.