Lotto Losers

As a computer programmer, I have zero patience when it comes to poor web site/web application customer service. If you build it (and have methods for users to contact you on a web site) then you had better support it.  Anything less is lazy.

I recently visited a state lottery web site. I could tell from the information on the public side of the web site that they allowed the purchasing of lottery tickets to local users (within the state).  However, I could not tell if they allowed the purchasing of lottery tickets by a local user (within the state) as a gift to another local user (within the state).  I proceeded to go through the tedious process of setting up a login account in the hopes of finding out the answer to my question. What I learned is this:

  1. The site asked for unnecessary personal information on set up of the online account.
  2. The site did not allow purchasing lottery tickets as gifts (why isn’t this made clear outside of actually setting up an account and going half way through the purchasing cycle?)
  3. After I realized the site did not offer the option I wanted, I wandered around the site for 20 minutes trying to find an option to delete my account since I realized by this point that I have no use for it. I found no option to delete or deactivate the account. So I then contacted their customer service using the contact us email on the site and requested the account be deactivated or deleted. Two weeks later I still have not heard from anyone regarding this request.
  4. I just sent another request again asking that the account be deactivated or deleted.
  5. If the staff is unable to handle incoming electronic requests, then this needs to be stated on the web site and all electronic means of communication need to be removed from this web site.

Pathetic.

Feedback form landfill

Why would a perfectly good company with a sweet web site have a feedback form on the web site yet never reply in any way to anything submitted via the feedback form?  I bet the Magic 8 Ball cannot even answer this one.

As an introvert, I love the feedback form.  The feedback form allows me to submit my question or request without interacting with humans.  If I have not heard back from anyone at the company within three weeks then I assume copious amounts of infighting are taking place within the organization causing normal day-to-day operations to cease.

I guess I could blame the webmaster but since I am a webmaster as well, I just cannot do that.  I realize some of these form submissions go straight to the email box of specific individuals within an organization and depending on those persons goals in life, my data coming into their email box may be the number one priority or not even fall on their radar.

If you are a webmaster, and you or your clients are ignoring feedback form requests coming in, I recommend removing the feedback form from the web site immediately.  Ignoring requests coming in is not only wasting the time of the visitor filling the form out but it is also generating content that you or your clients have to read and deal with and if no one is caring for this data then the process needs to stop.  This stop action will now free up the time of the visitors so they may begin their lifelong wish of learning how to cross-country ski and you and your clients now have the opportunity to play Pac-Man without interruption.

To give you an idea of how frustrating it is to be ignored, I have included a feedback form below, please fill it out and I promise I will never acknowledge the existence of your form submission.  After about one month of waiting for a reply from me, you will find yourself slightly agitated and morose.  These feelings will soon pass but then a giant wave of regret will follow and you will wish you had never filled this form out.  Once you have reached this stage there is nothing you can do but wait it out, preferably in a hot tub on cool nights and just hope for the best.

Web Applications – make this clear to users at all times: where they are and what they are using

When a user experiences a problem using an application, the list of possible issues can be lengthy depending on the complexity of the environment(s) and dependencies.  If the user is unable to clearly articulate to the help desk what application is broken or where they are when issues arise then this is a clear indicator that the training, documentation and application itself are not all using the same language.

Make things easy for your users by following these simple steps with every application your write and/or support:

  • Give the application one name and one name only. In this example we will give our application the name “Blue Safari”.
  • Place the name of the application prominently on every page of the application. This means “Blue Safari” is on every page of the application.  (not “Bls Version 2.0” but “Blue Safari” or “Blue Safari Version 2.0”)
  • If your application is a web application, try to place the name of the application somewhere in the url if possible.
  • All shortcuts or hyperlinks that take users to the application should be the name of the application (i.e. “Blue Safari”)
  • In all documentation and training for users and support staff, refer to your application with the same language. This means all references to the application will be stated as “Blue Safari”.

If you give your application several different names then several problems arise:

  1. The user either doesn’t know what to call the application when he or she calls the help desk to report the problem or the user calls the application by a name that no one at the help desk recognizes.
  2. A significant delay occurs before the issue is resolved simply due to the time spent sorting out the confusion over what exactly is broken and where it is.

Avoid contributing to the overall mayhem of our existence, it will only end badly, we both know that.  Unless of course your help desk gives out free ponies and chocolate ice cream with every call, then maybe as a caller I will not care so much that I am unable to clearly tell you what is broken.  Now I want ice cream.

IFrames are messing up my HTML Responsive web site, oh the drama of it all! Long live hamsters!

In remembrance of my recently departed (and perfect in every way hamster) Snowflake Brownie, I created a new web site dedicated to all things hamster: http://www.myhamsterzoo.com that utilizes HTML Responsiveness (so basically the web site lays out in 3 nice columns when the web site is viewed on large monitors and then morphs into 1 nice column when the web site is viewed on small devices like smart phones).

My provider, Network Solutions, offers web forwarding so since I already have an existing web site, my plan was to create a page on my existing web site and forward this new domain of http://www.myhamsterzoo.com to my new page (http://www.mummey.com/myhamsterzoo.aspx) on my existing web site. All was well at first. HTML Responsiveness was working as expected with web forwarding turned on but then I went one step further in the options of web forwarding and selected the option to have the URL masked from the visitor (this means the user, when visiting http://www.myhamsterzoo.com, would be forwarded to http://www.mummey.com/myhamsterzoo.aspx but the user would not see http://www.mummey.com/myhamsterzoo.aspx in the address bar, the user would continue to see http://www.myhamsterzoo.com. Unfortunately, taking advantage of this additional web forwarding feature of masking broke the HTML Responsiveness.  With this masking feature turned on, the web site remained in the 3 column layout no matter what size the monitor was so I have since turned this masking feature off so that HTML Responsiveness will work.

I believe the reason this has occurred is associated with the masking feature dumping this web site into an iFrame and the tags in the iFrame may not contain things needed by HTML Responsive layouts (i.e. meta tag like meta name=”viewport” content=”width=device-width, initial-scale=1.0″), even though I have these requirements in my page.  I’ve notified Network Solutions regarding the matter just in case they have a solution or alternate options.

Critical Side Note:

In researching what domains were available that contain the phrase “hamster” for this project, I learned there are quite a few “hamster” sites out there that are beyond disturbing so I would recommend absolutely positively NOT incorrectly typing this url (http://www.myhamsterzoo.com) when attempting to visit my awesome new hamster care web site and make ABSOLUTELY SURE that if you mention my hamster care web site to anyone that you check, double check and triple check that you gave them the correct url of http://www.myhamsterzoo.com because holy molasses on a cracker with a shot of whiskey, you don’t want to go to the wrong hamster url, unless of course you want to harbor horrific memories that will forever carve out a cozy section of your brain for quiet nights when you are feeling vulnerable and are questioning the existence of humanity.

Writing code: experimentation is the best part

random_by_jmummeyI recently wrote a desktop application, a small piece required that I draw a simple rectangle to the screen. When I drew the rectangle I made an error, I put the x-coordinate in as the width and the width as the x-coordinate. The result was pretty but not what I wanted so I fixed it and moved on. But I came back to it later that night and started fiddling with the code to generate more unexpected graphics. In the end I had written a simple method in the C# language where I feed it random x and y coordinates as well as random height and width sizes and random shapes to draw on the screen. I liked the images so much (only because some remind me of Star Trek) that I picked out what I consider to be the coolest 60 images and published them in my first artistic coloring book called “Random”. The book size is 8 ½ x 11 and each image is on the right with a blank page on the back so the images can easily be colored, removed and framed without disrupting the other images. Check it out and color all of your boring processes away: https://www.amazon.com/Random-Coloring-computer-generated-coordinates/dp/1539987582

If you are interested in learning how to write code, the instructions below will help you get started, these are the steps I went through to create some of the artwork in the book Random that I mention above, enjoy and code on:

Language used:  C#
Type of application written:  console application running on my Windows desktop PC (no server needed)
Developer tools used:  Visual Studio, running on my Windows desktop PC (this is available to you for free): https://www.visualstudio.com/free-developer-offers/

Steps performed for drawing ellipses:

  1. Install Visual Studio from the link provided above
  2. Reboot
  3. Open Visual Studio
  4. Select File > New > Project > Templates > Visual C# > Windows > Classic Desktop > Console Application
  5. Name the application and choose a location to store it > select OK
  6. The “Program.cs” file should have opened by default for you. It will look something like this:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)//main method begins
{

}//main method ends

}

}

  1. Look in the Solution Explorer (View > Solution Explorer) and add a reference to a library for drawing:
  2. Click once on “References”, right click and select “Add Reference” and find “System.Drawing”, place a checkmark beside “System.Drawing” and select OK
  3. Towards the top of “Program.cs” add this: usingDrawing; and also add using System.Drawing.Imaging;
  4. Inside the Main method, add the following for loop (the purpose of this for loop is make many images. If you set this for loop to run 40 times then that means 40 images will be created and stored in the Temp directory on your c drive.  If you set this for loop to run 10 times then only 10 images will be created and stored in the temp directory on your c drive:

for (int t = 0; t < 40; t++)
{

makeSweetImages3();   //call method repeatedly to create multiple images

}

 

  1. Under the Main method, add the following method, this method does all of the work (declares random coordinates, draws the image and stores the image):

static private void makeSweetImages3()
{

DateTime localDate = DateTime.Now; //we use the milliseconds to uniquely name each image
Random rnd = new Random();
Bitmap bitmap = new Bitmap(2552, 3302);//width, height
bitmap.SetResolution(300, 300);

// Draw graphic
int z = rnd.Next(1, 2550);//to represent width of item being drawn keep btw these values
int b = rnd.Next(1, 3300);//to represent height of item being drawn keep btw these values
int k = rnd.Next(0, 2550 – z);//to represent item on the x axis keep between these values
int m = rnd.Next(0, 3300 – b);//to represent item on the y axis

using (Graphics gr = Graphics.FromImage(bitmap))
{
gr.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;//type of line

for (int p = 0; p < 10; p++)//number of ellipses being drawn for this one image
{
System.Drawing.Rectangle rect5 = new System.Drawing.Rectangle(k, m, z, b);
// x, y, width, height, stage is set for graphic, when you draw an ellipse you
//have to define its outer rectangle first then draw the ellipse within or on
//said rectangle
using (System.Drawing.Pen thick_pen = new System.Drawing.Pen(System.Drawing.Color.Black, 2))
{
gr.DrawEllipse(thick_pen, rect5);//draw graphic
}
z = rnd.Next(1, 2550);//width
b = rnd.Next(1, 3300);//height
k = rnd.Next(0, 2550 – z);//x
m = rnd.Next(0, 3300 – b);//y

}
}

bitmap.Save(@”C:\Temp\” + localDate.ToString(“yyyyMMdd-HHmmssfff”) + “.png”, ImageFormat.Png);
//save image to Temp directory on c drive
}

  1. Run the console application by selecting Debug > Start without Debugging (you will notice a black console window will appear, once the console window displays “Press any key to continue…” you will know all drawings are complete, press any key to close the console window)
  2. Navigate to C:\Temp on your computer and view the beautiful images you just created

Getting old Crystal Reports into Visual Studio 2013/2015, a quick how to…

I had Crystal Reports on an old server.  It was time to make a decision regarding how to get the reports over to a new server quickly and at the same time avoid purchasing more software and enduring installations, testing, etc.  For now, I decided to put the reports in Visual Studio.  If you find yourself in a similar situation, then the information below may save you some time.  This is how I did it:

  • Closed all applications on my pc (Windows 7, 64-bit)
  • Installed this: http://scn.sap.com/docs/DOC-7824 (Support Pack 16, I MUST INSTALL the exe, NOT the msi or it will not properly integrate with Visual Studio), at the end of the installation it asked me if I would also like to install the 64 bit, I said no and all was well.
  • Rebooted pc
  • Copied this folder: C:\Inetpub\wwwroot\aspnet_client\ into the directory with my Visual Studio solution (I created a solution in Visual Studio called crystalReports) on my pc and inside the solution I imported the crystal report rpt file then I created an aspx file where (from the Toolbox > Reporting) I dragged a “CrystalReportViewer” and “CrystalReportSource” onto the code in Design view.  It will look like this:

” <CR:CrystalReportViewer ID=”CrystalReportViewer2″ DisplayToolbar=”True” DisplayStatusbar=”true” runat=”server” AutoDataBind=”true” />
<CR:CrystalReportSource ID=”CrystalReportSource2″ runat=”server”></CR:CrystalReportSource> “

The code behind has a Page_Init like this (if you leave out the init then you will most likely see issues when you try to view multiple records within the crystal report):

protected void Page_Init(object sender, EventArgs e)
{
ReportDocument reportdocument = new ReportDocument();
reportdocument.Load(Server.MapPath(“myCrystalReport.rpt”));
ConnectionInfo connectInfo = new ConnectionInfo()
{
ServerName = “servername\\SQLEXPRESS”,
DatabaseName = “dataInReport”,
UserID = “cheesyPoofs”,
Password = “chess”
};
reportdocument.SetDatabaseLogon(“cheesyPoofs”, “chess”);
foreach (CrystalDecisions.CrystalReports.Engine.Table tbl in reportdocument.Database.Tables)
{
tbl.LogOnInfo.ConnectionInfo = connectInfo;
tbl.ApplyLogOnInfo(tbl.LogOnInfo);
}
CrystalReportViewer2.ReportSource = reportdocument;
}

  • Run the aspx page and you should see the embedded crystal report running properly on your pc
  • You also need to install Support Pack 16 on whatever server you plan to run this Visual Studio application on so remember to do this before you publish your application to a server
  • You also need to copy this folder: C:\Inetpub\wwwroot\aspnet_client\ to the same location on the destination server
  • You might need to download the individual drivers to get a specific report working, I didn’t have to do this but it could be a possibility for you (i.e. https://dev.mysql.com/downloads/connector/odbc/3.51.html)
  • Misc Note: Cross reference web.config vs your ODBC. NOTE DSN entries mean you need an existing connection with that name.

Avoid fully justifying text on electronic devices, align text to the left

If you come from a heavy print background and you are trying to create content for the web, by default you will be driven to fully justify the content on the screen. Avoid doing this. Justifying text is fine for print but it does not translate well to electronic devices. Justified text on an electronic device is not only difficult to read by people with good eyesight, the content is extremely difficult to read for those with cognitive impairments and there is no control over where words break (and the words do not break with required hyphens, the words just break).

Below are two examples of content so you can see the difference:

Fully justified content (this is hard to read)

I wonder how much more I would have accomplished in my life up to this point in time if I had not had to sleep. Just getting back 20 years’ worth of 8 hours of sleep each night would mean a surplus of 58,400 hours! With all of that extra time I could have written 2 long running soap operas by now, become an Olympic skier, crossed Alaska on dog sled, swam across the Atlantic Ocean and learned Physics! Oh Raisinets! I have piddled my life away! No! Why?! Why?! Why?! Oh well, hopefully by the time I hit my 80’s, some fabulous little scientist will announce a wild discovery of complete control over the aging process and I can forever turn my clock back to when I was 72 because that is sure to be my best year yet!

Left-aligned content (easy to read)

I wonder how much more I would have accomplished in my life up to this point in time if I had not had to sleep. Just getting back 20 years’ worth of 8 hours of sleep each night would mean a surplus of 58,400 hours! With all of that extra time I could have written 2 long running soap operas by now, become an Olympic skier, crossed Alaska on dog sled, swam across the Atlantic Ocean and learned Physics! Oh Raisinets! I have piddled my life away! No! Why?! Why?! Why?! Oh well, hopefully by the time I hit my 80’s, some fabulous little scientist will announce a wild discovery of complete control over the aging process and I can forever turn my clock back to when I was 72 because that is sure to be my best year yet!

Want to learn how to write applications for computers and devices? Microsoft is opening up Visual Studio and .NET to individual developers for free!

Visual Studio is one of the tools I use to write some of the web and console applications my clients use each day.  Visual Studio offers a pretty stable and user-friendly environment for writing Windows, Android and iOS applications, this would be a good environment to learn in if you would like to start programming.

Here are a few steps to get started (perform these steps on your home computer):

  1. Make sure you have at least Internet Explorer Version 10 installed on your home computer (you don’t absolutely have to have IE 10 but having version 10 will be a little less problematic). If you would like to install IE 10, you may install it from here: (first close all running applications on your home computer) http://windows.microsoft.com/en-US/internet-explorer/download-ie and reboot after the installation.
  2. Install IIS on your home computer (first close all running applications on your home computer). Installing IIS on your home computer will allow you to easily view and test web applications from your home computer. If you do not install IIS, then you will not be able to easily test any web applications you create on your home computer, you will be forced to deploy your code to a web server somewhere to properly test it. Carefully review the screenshots on this page. The screenshots demonstrate how to install IIS on your home computer (the steps vary depending on your Windows version but this gives you a good idea of how the installation is done): http://www.howtogeek.com/112455/how-to-install-iis-8-on-windows-8/.
  3. Download and install the Visual Studio software and tools to your home computer from here (read the system requirements before installation, the system requirements are towards the bottom of the download page and also close all running applications on your home computer prior to install): http://www.visualstudio.com/en-us/products/visual-studio-community-vs. You may keep the default selections during the installation. This installation may take up to two hours depending on the processing power of your home computer so plan on starting the installation and walking away (just check on it every 20 minutes or so). Do not attempt to do any other work on your home computer during this installation.
  4. Reboot your computer once the installation is complete. At the end of this installation it tells you that you may immediately launch Visual Studio but just out of best practice I always reboot following any installation. So, either click on “Launch” at the end of the installation or reboot and then find the Visual Studio icon on your desktop and double click on it to open Visual Studio (it may be in your start menu under Start > All Programs > Visual Studio 2013).
  5. You don’t have to sign in right now, I would recommend doing it at some point but as you are learning you can skip sign in by selecting “Not now, maybe later”.
  6. You might be prompted to set up your environment for the first time.  If you are, select “Visual C#” from the Development Settings dropdown menu.  You don’t have to select this.  C# is just what I select since I know I will primarily write in the language C#, this can be changed later to something else. Choose a color theme if you are prompted. Select Start Visual Studio. Note: opening Visual Studio for the first time may take several minutes.
  7. With Visual Studio open, you are now in the exploration and experimentation phase. This is where you will look around, read, watch tutorials, and try out sample code to learn as much as you can before jumping in. The first link you should see towards the top of the interface is “New to Visual Studio? Check out coding tutorials and sample Projects” (http://msdn.microsoft.com/en-us/vstudio/dn439939), click on this link and begin! Expect to spend at least 40 hours in this exploration and experimentation phase to get a strong understanding of the environment and writing basic code. I would also recommend watching youtube.com tutorials on Visual Studio (ex. from youtube.com search on this phrase: visual studio community 2013 tutorial).

If you’ve made it through the exploration and experimentation phase of step 7 above, and you are still excited about programming, then it is time to jump into the deep end:

  1. Now is as good a time as any to decide what kind of programmer you will be.  Avoid lying to yourself, you know you better than anyone else ever will.  If you think you are a bad person then you will probably write code with malicious intent.  If you think you are a good person then you will hopefully write code with good intentions.  If you think you are a bad person but believe your ‘badness’ will go undetected because you will write code with malicious intent disguised as code with good intent, you are mistaken.  In the end all secrets are revealed, it doesn’t matter how well you attempt to conceal them.
  2. Carefully review programming rules and best practices from the following sites: http://msdn.microsoft.com/en-us/library/aa260844(v=vs.60).aspx and http://www.w3.org/standards/. They may not make much sense now but they will as you begin to code.
  3. Carefully review code of ethics postings for computer professionals, ACM has a really good one:  http://www.acm.org/about/code-of-ethics, or Wikipedia: http://en.wikipedia.org/wiki/Programming_Ethics.
  4. Complete an introductory computer science book (ex. Invitation to Computer Science by G. Michael Schneider and Judith Gersting).  Make sure you read every chapter and successfully complete every exercise in the book.
  5. Learn HTML, the most basic language for creating web pages.  Go through the fantastic tutorials and chapters found here: http://www.w3schools.com/html/.

I will add more steps soon, happy coding!

Web Design Tip: Avoid Publishing Useless Information

A web page is a fantastic platform for communicating with the entire digital world. Avoid wasting a visitor’s time by bombarding him or her with useless information.

Here are a few examples of useless information and preferred solutions for the best possible visitor experience:

Say you add a section to the top of your web page called “Announcements” but you don’t have any announcements yet so you have the phrase “no current announcements” listed under the section called “Announcements”. All of this verbiage is taking up real estate and is only wasting time for visitors because the empty announcements section is forcing the visitor to read text that provides no value. If there are no announcements, then refrain from displaying the announcements section. Only display the announcements section when there are actual announcements.

Say you have a link on a web page, or in the left navigation. The visitor clicks on the link only to reach a web page that reads “Under Construction”. This action wasted a visitor’s time, multiply the time wasted by one user by the number of all visitors to the web page in a given year and an astronomical amount of time has been wasted because a web page simply stating “Under Construction” provides no value. Avoid providing links like this. If a web page is not ready then avoid linking to the web page all together. If you want to give visitors a sneak peak of what is to come, simply state something like “Coming Soon” next to some content, avoid making the user click on something only to have him or her then discover there is nothing of value to be read.

Getting Open XML up and running for .NET C# Web Applications

I had to get this set up quickly on Friday for a web application that creates a Microsoft Word document on the fly and I write text to the document.  Just in case you need to do the same and haven’t had time to research how to do this yet, these are the exact steps I went through to get this up and running for my web application:

  1. install OpenXMLSDKV25.msi first and then install OpenXMLSDKToolV25.msi, they are here: http://www.microsoft.com/en-us/download/details.aspx?id=30425 (hit the download button and select each one)
  2. create a project in Visual Studio
  3. add this reference to your project: DocumentFormat.OpenXml
  4. add this reference to your project: WindowsBase
  5. in top of your code behind of project add this:

using System.IO;
using System.Xml;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Wordprocessing;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;

  • in your code behind of project, add this code (run code and you will find your new document with your text of Hello World in it):
    protected void Page_Load(object sender, EventArgs e)
    {
    HelloWorld(@”c:\test\testDocument.docx”);
    }
    public void HelloWorld(string docName)
    {
    // Create a Wordprocessing document.
    using (WordprocessingDocument wordDocument = WordprocessingDocument.Create(docName, WordprocessingDocumentType.Document))
    {
    // Add a new main document part.
    wordDocument.AddMainDocumentPart();
    //Create the Document DOM. wordDocument.MainDocumentPart.Document = new Document( new Body( new Paragraph( new Run( new Text(“Hello World!”)))));
    // Save changes to the main document part.
    wordDocument.MainDocumentPart.Document.Save();
    }
    }

HAPPY CODING!

Blog at WordPress.com.

Up ↑