-
it really is a good idea to test regularly on Internet Explorer if you are developing on another browser. Also test any clever feature on IE before going ahead.
Where there is a difference, IE is surprisingly sometimes right according to the standards. IE has a debugger, so you can easily find any problems. IE also has a simple profiler which counts and times when functions are executed
-
I started off writing debug information at the bottom of the page. But after a while I did not look at it much and just added alerts showing the values of variables.
I realised too late that it is best to use a common function to write out debug trace information.
When there is a lot of debug information, the code I use becomes very slow in my browser. For example,
if (debug) { dbg.innerHTML += fname + '(): loop: ' +
numbersInOrderIndex + '<br/>'; }
Maybe this is because a fresh copy of the debug listing is made each time something is added and the browser reformats the whole listing each time. It might be better to create a new text node each time and append it to the debug area
-
I wish I had used a common function to show errors and used more user-friendly messages.
Unfortunately, I just coded in alerts with quite technical messages like:
alert(fname + '(): bad how: ' + howElementHidden);
-
it turned out to be a good idea to keep details of the players' boards in JavaScript data structures away from the boards' visual representation as HTML
Maybe this is a bit like the Model View Controller (MVC) idea for Graphical User Interfaces
-
there is lots of help on the web but it helps if you search for a specific JavaScript feature
-
I like the tutorials on the 'quirksmode' website
-
I find articles by Douglas Crockford are particularly good for indepth explanations
-
JavaScript really is not much like Java. JavaScript is rather like 'C' and does the usual 'C' things with constructs like:
while ((c = getchar()) != EOF) {}
Like 'C', JavaScript is a small language and it is easy to understand all of it, unlike 'C++'. JavaScript has some tricky features like prototypes just like 'C' has pointers
-
almost all my errors are typing mistakes
Several times, I thought they were bugs in the browser or the JavaScript interpreter, but they were typos
-
I use the free JavaScript guides: 'the FieldCommander JavaScript Reference Guide' and Danny Goodman's 'JavaScript and Browser Objects Quick Reference.'
The first is a bit old and maybe not on the web anymore. I use them because I work offline without an Internet connection and they can be downloaded
-
you don't need a fancy editor or debugger.
I used 'vi
' and relied on brief error messages saying which line the problem was on.
Your browser probably has a useful JavaScript debugger though.
(In fact my browser, Konqueror, does have a debugger but I built my own Linux and I sometimes have a problem with threads which seems to make the debugger lock up)
-
I now check changes into RCS very frequently as I develop the game, partly in case I make a terrible mistake.
RCS is, of course, a free Unix source control system.
I have stored over 2000 revisions of the game so far!
I also find RCS very useful for lots of others things, such as the website pages, 'minimising' scripts, articles and the 'PAD' file
-
I find I can still make small changes to the game whilst I test it
-
I remembered that the point of testing is to find bugs, so I try not to be too disappointed when I find bugs
-
when testing it may be best to start up your windows and browser afresh and not have anything big running in the background
I had a bug where the game just stopped perhaps because there was not enough memory to start a new thread with the JavaScript 'setTimeout()
' function
-
other applications run faster if I completely close down my browser
-
it is nice to write animations so that they can be combined
For example, the background might disappear as the foreground text expands
-
I managed to have a common loop to go through the steps of of each animation
-
animations that have transparent elements seem quite slower
-
put a version number somewhere on the web page so you know which version you are testing
I even change the version when I am in the middle of making changes
-
you can use browser screenshot tools if you cannot test your web pages on other browsers
There is the 'browsershots.org' web site
The 'saucelabs.com' site lets you interact with your web page. This site gives unlimited time to free projects
-
you can test pages of HTML in the Chrome browser and the latest Internet Explorer browsers by using Sourceforge and 'saucelabs.com'
Make your page an attachment to a Sourceforge page in your project's wiki. Click on the link for the attachment from 'saucelabs'. Then choose a browser from the 'Open with' box at the bottom of the screen
-
I actually use some of the documentation of the program myself
I often refer to the list of the main functions in the game.
I hardly ever read the detailed descriptions of the processing
-
the way the game can play itself continously was useful when finding bugs
-
after a while, I focused on developing the game, and see making releases as a sideline
-
I used a separate email address for the game that differs from my personal email address
-
I upload the last items first to the download page on Sourceforge
Sourceforge shows the most recent items first
To get the directories in the right order in the file download area of Sourceforge, I add small files (called 'IGNORE') to the directories
-
I backup my work by emailing the game to myself
This mean I have many versions saved.
I save the sound files in the file storage area of 'GMX' mail. There seems to be a limit to the size of email attachments of about 50 megabytes
-
I make notes on till receipts as I walk along or on the bus
I organise them in an old envelopes
-
I use Sourceforge rather than Google because Google seemed more for several people working on a project
-
Use HTML to format Sourceforge pages
I used Sourceforge's own formatting and then some of it stopped working
-
I don't stop developing when I do the final testing for a release
I branch the code. I find testing boring
-
when I started I released some versions that were not fully tested as 'unstable' releases. I do not now
-
it seems best to test each path through the code rather than just playing the game a lot
-
sometimes I think the game is ignoring my clicks on an HTML button when an alert box is shown
-
I found 2 websites that would host my game for free: '000webhost.com' and 'freehostingeu.com'
Then it was easy to test my game in different browsers using 'saucelabs.com' which is free to Open Source projects.
Several other websites offering free hosting did not seem to completely work.
Several other websites seem to force you to use their website templates or website creation tools.
000webhost.com ' had my game 'under review' for several weeks until I raised a ticket with their helpdesk.
'freehostingeu.com' was unavailable for a few days asking for a login
After a year, 000webhost.com now sometimes shows ads for its paid website hosting. These ads disappeared when I used the 'remove inactivity ads' option in the control panel
000webhost.com adds a call to a script at the bottom of uploaded HTML files. I think this script show the adverts. The script seems to give an error on Internet Explorer 8. The script defines '$' which clashed with mine
freehostingeu.com will not serve a page that contains 'bad' words
With 000webhost.com you can upload files as zip archives which are then automatically unzipped. 000webhost.com' does not seem to correctly handle my 'gzip' files
-
Internet Explorer 8 in my local library did not work with the new menus used by 'freehostingeu.com' at the end of 2013. The menus work fine now
I get round this by using a session at 'saucelabs.com'
-
I would add a comment at the top of each function if I was writing the game again
I would not comment the parameters of functions.
To understand the code when I amend the code, I look at the code and put in 'alert
s'. I do not look at the documentation much
-
I find it best to review afterwards any code I write late at night or early in the morning
-
getting the shadows under the boards right was quite difficult
-
the saucelabs cross-browser testing tool is very slow at displaying JavaScript alert boxes
-
the log files produced when my browser crashed almost filled up my disk
-
no-one reported any bugs and no-one posted any messages to the forums I set up on Sourceforge
-
I find it easier not to set a date for a new release but instead concentrate on the steps needed to get there
-
when testing, I try to find bugs rather than just confirming the program works
-
testing seems a good time to start developing new features when there is no pressure
-
when I make a change, I usually look for a similar bit of code in the program to copy
-
I turn off the spam filter on my mail account so I can get confirmations when I register for services on websites
-
the way I do 'responsive design' is to develop and test on an old browser and then add features for new browsers
-
I have a saying: 'if it is easy then it is not worth doing'
-
the changes I make first are the ones I think people will notice most
-
on most Android devices, phones have the words 'android
' and 'mobile
' in the 'user agent string' sent by their browsers whereas tablets have 'android
' but not 'mobile
'
-
you need to test on a real iPad as well as a simulator
-
I test the game on the iPads at the local Apple store
-
my 'minimising' scripts create a file 10% smaller than the Google Closure Compiler
But my scripts take 45 minutes to run. The Closure Compiler takes less than a minute
-
Internet Explorer 11 does not have 'MSIE
' in its 'user agent' string.
It has 'Trident/7.0; rv 11.0
' instead
-
I find that I do more if I think about it on the bus and then spend a couple of hours in the evening on it, rather than spending most of a Saturday or Sunday on it
-
you can click anywhere at the top of a 'select list' not just on the arrow on the right
-
only a few hosting providers seem to be free and show no ads
Some of the registration pages do not seem to work or are similar to others.
You may get a more reliable service if you show some ads
-
I work on a copy of the game with lots of alert
s which I remove when I make a release
-
Internet Explorer adds the word 'Touch
' to the 'user agent' string on a touch-screen running Windows 8 or later
An example 'user agent' string is:
Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0; Touch) like Gecko
-
when testing with Internet Explorer on Windows 8 with the saucelabs cross-browser testing tool, the 'user agent' string does not contain the word 'Touch
', maybe because it is running on Windows Server
-
one way to make web pages look nice on Internet Explorer 8 is to use gradients generated by Microsoft visual filters
-
I try to code the hard but better way rather than the easy but not so good way
-
I look through the code after it has been 'minimised' to see if I can make it smaller
This takes about an hour
-
if you have variables with similar names, then it makes the 'minimising' harder
For example,
-
you can see what your page first looks like better with the saucelabs cross-browser testing tool if you reload the page after it is first shown
-
I find it best to only do testing for one hour at a time
-
to put an app on the Apple iOS App store you have to pay $99 a year to join Apple's developer program
-
I observe how people sitting in front of me on the bus use their tablets and phones
-
I test the game on Android (and other) tablets at my local PCWorld store
I also test on touch-screen Windows 8 computers there
-
my game looks better on a real Android tablet rather than than a simulator
On the simulator, the words of the introduction are put in a narrow column rather than using the full width of the page
-
you need to plan for the developers being ill
I fell ill just before a release
-
you can roughly simulate a tablet on a PC by reducing the font size in the browser (or 'zoom-out') and narrowing the window
-
I think there are always bugs with most programs
-
I use the 'bc
' program on Linux to convert colors to hexadecimal
You say 'obase=16
'
-
when I developed the game, I wrote scripts to shorten names in the code. Now I also just add to a list of substitutions
-
it is good to include a lot of detail in your release notes
This is what people recommend. It also reminds you what you have done
-
testing on Internet Explorer 8 picks up more JavaScript errors than my browser
-
I find it useful to do lots of testing when I am developing rather than waiting until before I release a new version
-
when I 'google' for a technical problem, I look for the results from the 'stackoverflow' website and the 'Mozilla Developers Network' website
-
if you make up CSS rule names in JavaScript from a root part and an index part on the end, then this may cause problems when you 'minimise' the code
For example, if 'repeatFade1
' and 'repeatFade2
' are 'minimised' to different names like 'fhd434
' and 'ghl756
'
-
it may be best to code a break out of any infinite loop after too many iterations
I had a bug and I could not tell if the browser had hung repainting the screen or if my script was in an infinite loop
-
the saucelabs cross-browser testing tool makes light grey elements seem almost invisible
-
my Konqueror browser takes a long time to load a page if I have loaded the page a lot
My browser takes up most of the free memory on my old computer.
I have read that browsers leak memory
-
to take a screenshot on Windows XP, press 'Ctrl+PrintScreen' and then paste the screenshot into Windows Paint
-
the output of one of my 'sed
' scripts, that I use in 'minimising' the game, was mixed up when the disk was nearly full
-
Tucows, the download site, took 3 months to review my game and then rejected my game, saying the file extension was wrong ('bbingo.html.zip')
Tucows really wants you to pay them (at least $60) to review your program
-
'freecode.com' have frozen their website (as of July 2014)
-
constantly changing elements of a page can be just as attractive as shadows or gradients
For example, in my game I highlight the numbers on the boards of players as the numbers are mentioned
-
when I produce new versions every month, a lot of my time is spent testing and minimising (one or two weeks)
-
the Free Software Foundation says that JavaScript code that is minimised is not Free unless the JavaScript says where the source code can be found
The Free Software Foundation suggests using a '@source: url
' documentation tag
-
the Free Software Foundation have a short version of the GNU General Public license (GNU GPL) suitable for JavaScript
Normally you have to include a copy of the GNU GPLwith your code
-
when maintaining code I find it best to treat the original code with respect
-
on 000webhost.com, zip files are corrupted when I upload them with the 'other', windows-like, file manager
-
one public library I use, blocks you from using the 'net76.net' domain provided by 000webhost.com
-
the early hours of the morning are a good time to program, as it is quiet
But it can be cold
-
releasing a new version is just another step in developing, with problems and bugs to overcome (maybe with the hosting websites)
-
'000webhost.com' removes my large (4 megabyte) HTML files after a day or two. 'byethost.com' does the same and will not serve them. 'freehostingeu.com' will not let me upload large HTML files
-
I read that Chrome on an iPad uses the Safari renderer
-
a game is more enjoyable if you can win
Playing bingo with a few players is better than playing with lots of players
-
if you use the GNU General Public license (GNU GPL) for a JavaScript library then it may mean that anyone using the library has to open source their code too
-
my 'secret weapon' when developing is taking a break and visiting a relative (who plays bingo)
-
changing the 'text size' or 'font size' on browsers does not change the size of buttons or input fields whereas using the 'zoom' option does
-
to get to the settings in Chrome, click on the icon in the top-right corner showing 3 small horizontal bars on top of each other
On Firefox, clicking on these bars shows a menu with an 'Options' entry
On Internet Explorer 11, clicking on the cog in the top-right corner shows a 'Tools' menu
-
I still make changes, if they take no more than an evening, when I test before releasing a new version
But sometimes I continue into the early morning
-
on an iPad, a swipe does not fire the 'onclick
' event
-
copy and paste the words on the screen when you get an error or save a screenshot
-
double your estimates of how long things will take
-
I used to make small changes to the 'minimised' version. Now I think it is best to do the 'minimising' every time I make a change
-
re-writing code a different way is another way to fix or reveal bugs that are hard to find
-
my game very occasionally hangs on my old brower and has once hung on Internet Explorer 11
-
remember to play your game a lot if you are developing a game
-
remember to leave room for the image of the cursor if you are drawing a tip near the position of the mouse pointer
-
adding a light border to a region of light color makes the shape of the region stand out
-
I do the final testing half an hour at a time, with a longer break after an hour
-
you can get ideas for future developments when testing as well as finding bugs
-
when I am tired of testing, I get up and open the window or something, then come back and do some more testing
-
I try to test not too much and not too little
-
I release a new version after 2 or 3 days of testing without finding a bug
-
sometimes it is easier to make a small change than it is to think about the change
-
when I have done the final testing, I try to go live as quickly as possible
-
once when I tried to upload a new version to Sourceforge, I found that the developer tools were unavailable for a few days due to a storage problem
The upload option was unavailable for 2 weeks
-
reqularly quiting my editor ('vi') seems to save memory
-
my game looks best in Internet Explorer if I use a lot of shadows, color gradients and rounded corners
-
I get a few visitors to my Facebook page
I do not promote the page, so this is great
-
I use a 'minimalist' window manager, 'aewm', on Linux to save memory
-
I cannot upload an HTML file of just under a megabyte to 'byethost.com'
I cannot login securely as browsers on Windows7 do not trust the certificate
-
I try to do changes together that relate to the same part of the code
-
when I change code, I comment out the original code rather than removing the original code
I remove the commented-out code just before I make a release
-
'upload.com' seems a good download site
It is part of 'CNet'
-
changes often take an evening to code, but a week to test, improve and get right
-
sometimes '000webhost.com' is slow to respond, so I search for '000webhost' and go straight to the login page for members
-
the book 'Effective JavaScript' by David Herman is a good intermediate book
I borrowed it from a local library
-
I look in the catalogue at my local library for books and reserve books from other libraries in the area which are then transferred to my library
-
I change colors in 'rgb' format to hexadecimal format to shorten the code a little
I use this Perl code:
s/rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\)/sprintf("#%02x%02x%02x",$1,$2,$3)/eg;
-
when doing the final testing, I find it is a good time to learn more about JavaScript
-
when doing the final testing, I find I can still make small improvements to the code and minimising (minifying) scripts
-
I browse my free websites once a week to stop the hosting providers thinking they are unused
-
I change some colors in my CSS which are given as six hexadecimal digits to three hexadecimal digits to shorten the code a little
For example, '#ffffff
' becomes '#fff
'.
This shorthand is in the CSS specification. However it seems Internet Explorer 3 for Macs supported stylesheets but not the shorthand. Internet Explorer 3 dates from the later 1990's and probably would not run the JavaScript used in my game
Some browsers do not support three digit hexadecimal colors as shorthand in HTML such as when specifying the 'bgcolor
' of an element. This is because this shorthand is not in the HTML specification
Three digit hexadecimal colors may not be supported in the 'filter
' style attributes of Internet Explorer
-
you can shorten your code by leaving off leading zeroes in decimals
For example, write '.5
' not '0.5
'
But JSHint complains saying a dot could be confused with the dot between an object and a property
-
there are free copies of old technical books on the web in PDF format
They are not usually the latest editions.
I can find old O'Reilly books this way - sometimes new ones too.
I just search with 'google'
I got a piece of malware from one download site. It may be best just to follow direct links to PDF files
-
Smashing Magazine is a website and newsletter with articles about advanced topics in web development
-
Google Charts is a JavaScript API to create charts and graphs
-
I put the identification strings of the version control system (e.g. '$Date$
') in a string variable rather than in the comments as the comments are removed when the code is 'minimised'
-
you can put out a release in parts with maybe the essential code first and then the supporting documentation a day or two later
-
I find it is good to continue developing when testing the last change
Maybe I test better this way
-
'JavaScript: the Good Parts' by Douglas Crockford is a good book
It is short but old. There are free copies on the web.
-
the 'w' key on my old keyboard does not always work, so I use 'xmodmap
' in 'X Windows' to use the '#' key for 'w' with:
xmodmap -e 'keysym numbersign = w W'
xmodmap -e 'keysym F1 = asciitilde'
xmodmap -e 'keysym F2 = numbersign'
-
'gnuplot' draws good 3D graphs
-
'Eloquent JavaScript' is a good book
I particularly liked the example projects
-
on '000webhost.com', I cannot login through the home page. Instead I search for '000webhost' and choose the 'members' or 'login' page from the results
-
'000webhost.com' does not seem to serve files with a '.txt
' extension
'000webhost.com' handles '.csv
' files all right
-
'000webhost.com' claims '99.9%' uptime but a comment on their forum says they may say downtime is planned maintenance
My website was not available for several days
-
it really is best to put images in a sub-directory on the server
-
'HTML Utopia: Designing Without Tables Using CSS' by Rachel Andrew and Dan Shafer is a good old book
I borrowed it from my local library but you might find it free online
-
I remember the version of the source used for a release by making a RCS mark with 'rcs -n
'
-
if you are happy to make a release that is not quite perfect then you can make it a lot quicker
-
I tried not stopping developing whilst doing the final testing for a release. This worked quiet well
I did half an hour of testing at the end of the evening.
I developed some Microdata which did not affect the game
-
I created a 'beta' version before a release, but not many people downloaded it
-
one thing I learnt from using Microdata, is to give every web page a version
-
both Google search and Bing prefer my website at 'bbingo.eu5.net' (with 'freehostingeu.com') over the duplicate at 'bbingo.net76.net' (with '000webhost.com')
This is despite the fact that 'bbingo.eu5.net' is slow to respond.
I have duplicate websites in case one is not working
-
I test on iPads at my local Apple store
I go when it is busy, at weekends and bank-holidays. The staff do not pay much attention to me when it is busy
-
Internet Explorer only asks if you want to 'run scripts' if the page is on your computer
If the page is on the web then Internet Explorer does not ask
-
one day, I could not access my free website at '000webhost.com'. I had to change domains.
'000webhost.com' said I could use 'ftp' to download the files from the old domain and to upload files to the new domain. But 'ftp' is hard to use on the library computers I use for internet access. So I had to find the files on my computer at home and upload them. I could upload up to 20 files at a time when using the file dialog
-
I read a book about 'agile' projects. Am I 'agile'?
-
I focus on programming. I try to spend the least time on marketing, testing and releasing new versions
-
I sometimes program late into the night. 'Agile' projects try to work 35 hour weeks to stay fresh
-
I do not have automated testing. I test by playing my game a little every day. I get ideas for improvements
-
I do not 'refactor' code. I try to respect old code. There may be a reason for the way it works
-
I do not always work on the most important things. I can be more effective by working on related items. I can work on unimportant things that add depth. I can have some fun by working on things that interest me
-
I have a feature that I work on when I am waiting on something for the current change. 'Agile' programmers do one thing at a time
-
I write notes on pieces of waste card like the low-tech post-it notes and index cards that 'agile' developers use
-
I only spend a few hours a day programming. I do not spend the whole weekend programming. I have kept going for about seven years. This is like the sustainable 35 hour weeks that 'agile' teams aim for
-
I try to break developing into small steps that I can do in an evening. I try to leave the game in a working state overnight. 'Agile' developers do tasks that can be done in one day
-
I try to be polite and accomodating with Sourceforge and the free hosting sites that I use. They may be unavailable for a few days or block my content, but I try to remember that they are free. 'Agile' teams try to collaborate with external suppliers
-
sometimes I may start working on another feature before I finish the final testing of what I am currently working on. For example, I may want to do the final testing in the library where I can use Windows browsers and have internet access
The book is 'Agile Project Management for Dummies' by Mark C. Layton. I got the book from my local library
-
I do not look at my TODO list much
The list slowly grows in size. I do related things or rely on my memory. I include the TODO list with the source on Sourceforge
-
the 'YUI Compressor' is a 'safe' minifier that does not change your code much
It shortens local variable names.
It shortens my JavaScript by 22% compared to 27% for 'UglifyJS'.
This is over and above my own minimising and using 'JSMin'
-
the book '97 Things Every Programmer Should Know' is worth reading
You can read it for free online
-
I read 'Getting Real' by 37signals. Am I 'real'?
-
I changed my game to use curly quotes for speech. You would not notice the change. 37signals suggest being 'passionate' about your project
-
I tend to say 'we' when there is just me developing. But 37signals suggest being straight with your customers about your size
-
the W3C link checker points out links that have been 'redirected' and advises you to update the links
-
I had to change the free 'eu.pn
' website domain I used at 'freehostingeu.com'
The Pitcairn Islands said the 'eu.pn
' domain was harming their reputation.
I changed right away to 'mygamesonline.org
'. I later changed to the shorter 'eu5.net
'
-
using a free hosting provider such as '000webhost.com' is not perfect
My game loads sounds in real time across the web. With 000webhost.com' there are sometimes delays or errors such as not finding a file or getting an incomplete file
-
you must not panic when using a free hosting provider
I got a strange screen from '000webhost.com' part of which said I had exceeded my limit and had to upgrade. So I rashly upgraded to a paid account. Luckily, my debit card was declined. In fact, '000webhost.com' was not working properly and I could continue with my free account
-
sometimes when I upload a file to '000webhost.com' there is a delay of over ten minutes before the file appears on the web server
-
I write notes on bits from cornflake boxes
But ink smudges on the glossy outside
-
you can refer to a webpage as a subdirectory on the web server if you put the page in the directory and call the page 'index.html
'
-
releasing a 'beta' version breaks a release into smaller steps, reducing stress and leaving something if I die
I will try an 'alpha' release.
Nobody downloaded my last 'beta' though
-
doing a release over several days lets you be more careful and fix mistakes
You can have a good look at your entry at the download website before uploading the entry
-
I do a bit of testing most days in the library. I develop at home
This is a bit like running automated tests overnight
-
Microsoft Excel is good at drawing pie charts. Gnuplot is better at 3D charts
Excel uses a constant scale for the 'depth' or 'z' axis: one stop for each row of data
-
it is a good idea to read through your posts twice before sending
Check URL's in a browser, write a draft first, and do not forget to publish the draft
-
email messages from download and listings websites seem to go to the 'spam' folder of my 'gmx' mail account
-
I sometimes run out of memory and swap space on my old computer running Linux
I use the following to add more swap space:
dd if=/dev/zero of=swap1 bs=1024 count=100k
mkswap swap1
swapon swap1
Do not forget to run 'swapoff
' before shutting down Linux
-
I create 'sprites' from GIF's from 'animatedImages.org'
I separate the images using the 'layers' tool of 'GIMP'. I drag the images to new images. I use 'GIMP' to create a blank sprite. I use the 'combine
' program from 'ImageMagick' to position the individual images on the sprite
-
on 'Flickr', you can update an image by replacing it
-
're-factoring' may be where you produce a quick prototype and then later go back and tidy up the code
-
doing some programming can take your mind off your worries
-
if you work on a game for 10 years in your spare time, maybe you get the same result as a small team working for 1 year full-time