DesignAndCode.net

thoughts on Design, code, code management, database design and more

Updating Blog Offline

I had used my webhosts' software to deploy  BlogEngine sofware on this site, when I gave up on trying to figure out the DasBlog security features for their .Net 4.0 version;  I needed something simpler.

I had issues on what deployed initially on my webhost, and worked out some parts of a fix for the software when my webhost suggested moving to a newer server. By that time a new version of the BlogEngine was available from my webHost - Version 3.1.1. There were still odd things from the BlogEnginge install, that needed to be cleaned up. So - I decided to download the folder that had the BlogEngine software - and found that I could run it locally with Visual Studio doing an "Open website" and it could run with the same userids that were done in the setup. This gave me the opportunity to try to fix it locally.

I had a starting point and made the folder a Git Repository and did an initial commit - so that I could get back to the starting point if I messed up.

I was able to fix a few things trying out some other Themes, and even doing a local upgrade to 3.3.6 and then uploading the result back to my webhost.

With Git and Visual Studio - I could make the changes and verify that the site worked and commit to moving the software forward.

There are still some odd parts to using BlogEngine - but I will see if I can enhance it to work better for me. (When making Blog entries the box where you need to type is the same color as the background and no border to indicate it is there-until you click and start typing. It is controlled by a software project called "summernote" and is using an older version from what I can see.)

From the GitHub site - the software page goes now to a BlogEngine Hosting site - if you do not want to own your domain for blogging. I also found a post that wondered if the code base is "dead' - and they argue that the number of contributions has dropped off.  We will have to see what we can fix - as they say there were a number of bugs in the code.



Making it Stick

In the last quarter of 2018, I came across a post about learning things better. Some of the points made were different - be sure you are well hydrated and have enough sleep. The post also mentioned a book called "Make it Stick"  which I purchased.

I am still in the process of reading the book, but one of the key points so far is the idea of making sure you recall the information repeatedly. The book gives multiple examples of how testing on knowledge repeatedly shortly after learning, make the information retention much more successful. Pop-quiz is actually helping to ingrain the information for better recall.

Taking classes in anything, and then not using it - create a use-it-or lose it situation. Learning something, as you are about to use that knowledge makes that much more permanent. So doing the exercises from a chapter in a book- helps retain the info - even better is making your own exercises for the information.

I have recited the phrase "you have to teach in order to learn" - educators refer to this is "Learn by teaching" where the students learn material they must teach others with. This causes you to refine the information you have learned, putting into your own words and being able to express your understanding to others - independent of the material.

Learn by doing - is what exercises are for - it forces that retrieval of information - whether it is technical in nature, a musical instrument, or in cooking. You learn it better when you retrieve that information and apply it; then it penetrates more deeply.

I have read in some of my chess books, you have to play a lot of chess - where you apply what you have learned, and see how it works out.  One story from the 18th century had a person learn the basic moves, and in the course of the day, learned enough that they were able to win a game at the end - they were so enthusiastic they went and read chess material and playing out the moves on a board - doing almost nothing else (not eating or drinking) - and when they returned to play against another person they lost repeatedly. They had read a great deal and had a lot of theory - but they needed to actually apply that information repeatedly so that the patterns of how things worked penetrated; they needed to be able to use that knowledge independent of the material.


C# Language Features - after the fact

As a developer working with a team, there can often be newer language features in the language, that people on the team, just do not know about. The greater part of our  teams code base was written in VS2008 and VS2010, so that would be .Net 3.5 and 4.0.

A while ago, no one had started to use the Task class. I found myself and introducing that class into our code, learning more about how it should be used, and teaching others how these features work. Adding business value will have a priority in a company, before technical debt issues are addressed. The need for performance in response time brought the use of Task to the forefront; introducing it helped both add business value, and moved the code forward from .Net 3.5 to .Net 4.0.

Software development is a career that requires constant learning and experimentation - which is why having a variety of information sources is very helpful. Today I was going through my unread emails and a CodeProject article of what had changed during the  last 4 years since.Net was open sourced. This is the kind of article I can go back to for adding more of the language features to my tool box.

The starting link from there goes into the   C# 7.2 feature of Span<T> and has a link to the MSDN article of Jan 2018 from Stephen Toub who is one of the key people I have read from Microsoft in showing how things work at a very technical level. 

That got me to look a bit more and I came up with Mark Zhous' 10 part series on C#7 - which I need to go through - and start seeing if there are things that will make us more productive.

Learning after the fact - the new features that come out seems to be the norm. VS2019 just went into preview - and that will have C# 8.0.  

Playing Chess-Chess Engines

I started to learn chess when I was about 12, and stopped by the time I was 14. I was playing a game of chess with my younger brother, when I took his queen off the board, he cleared the remaining pieces with one swoop of his arm and that was the end of playing chess between us. It would  be nice after these decades to see if I could get him to try the game again.

I have tried to play at various points, and with computer chess I found I could always start a game; I rarely ever get past the opening - much less win a game. So I have wanted to learn how to play better - and I have dozens of books - but only one of them have I actually read cover to cover - and that took months.

I discovered the free software Arena, a number of years ago, and that comes with a few "Chess Engines". From their site I found that there are other free chess engines, and a few commercial ones. Once you have installed Arena (i am on windows) you just have to locate the exe for the engine and drag-and-drop the exe on the GUI and it will install the engine; I tend to drop the zip file into the engine folder of Arena and then install it from there. 

Some of the engines I recently installed 

Fire 7.1

Stockfish 10

Komodo 9

Andscacs (july 2018)

There are a number of sites that spend time getting these engines to compete, ChessOwl is one, and ComputerChess is another that I came across. If the number that these sites show for ratings are accurate - I might not win a game for a very long time, and with a lot of work and losses to learn from. 

I did run a short Tournament in Arena to find the weakest of the Engines (AnMon 5.75, then SOS 5.1 a bit higher) - so that I give myself a better chance of winning to start.

I did one game of Engine against engine Stockfish 10 against the Andscacs - where the Andscacs engine beat Stockfish in 91 moves and predicted checkmate 17 moves ahead. (the Andscacs site is in Spanish - the engine seems first rate though).

Blog Restart - 2018

I worked with my hosting provider for a good part of the afternoon - moving to a new hosting server within their data centers and abandoning the DasBlog content that I had created for the last ten years. I selected BlogEngine.Net and the hosting technicans had to adjust the installation to get the software running. Permissions, directory setups; a few things had to be touched and moved to get it set.

"Write to learn" is why I have a blog.

So with this restart of my blog, I hope to provide a value to readers, and organize my own thinking on the many topics that cross my path throughout the year. It really becomes a resource for me to go back to and see my notes on the topics.