Posts

Showing posts from July, 2020

1st step is to admit you have a problem

Image
I normally don't like to use the term "problem".  I prefer to see it as an opportunity or a "challenge".  Even when reporting a bug, I prefer to see it as a "coding opportunity". I think I do have a problem, though.  I gave up watching TV.  I am down from about 6 hours to about 1 hour a day.  That is a very good thing.  What I have replaced it with might be just as bad. It started out with good intension.  I wanted to improve my CSS skills.   I have had a PluralSight subscription for years and I use it often.  For my CSS skill upgrade, I was looking for a very specific Flexbox and  CSS Grid content.  PluralSight was overkill for this.   So I turned to YouTube ! I had been on youtube for music, how-tos, and animal videos, but not really for technology videos.  Once I searched for Flexbox, I found a treasure troll of great contact, all free. What I did learn was to watch a vary of different presentations on the sam...

Inspirational Quotes built in Blazor

Image
I decided to build something a little different this time.   I came across a quote I really liked.   It made me stop and think for a minute.   Once I digested the thought, it made me smile.   This got me thinking about having a new quote each day.   I am sure there are apps already available, but I bet there are not any built with Blazor.  Live Demo Requirements           1.        Source of the quotes must be free           2.        The quote displayed must be random           3.        There needs to be a background image           4.        Background image needs to be random           5.        Must be responsive       ...

CSS Theme Switching in Blazor

I am working on a project where I want to white label the application so each customer can utilize their won colors and layouts.   This is straight forward to do, each customer has their own custom CSS style sheet ad based on the call customer you dynamically change the style sheet.   Seems easy enough. Another good user case is be able to support a light and dark theme.   When the users select either the light or dark theme, we just change out the style sheet.   The first part of solving this, know who which customer is calling is fairly easy.   We can use a query string parameter to tell us who is calling.   Something like this: @page "/light/{style}" There are 3 steps to implementing this solution.   Set element id We need to set the ID on the style sheet link element.   We will be using this to select and edit that element.   This will need to be done in _Host.cshtml for server side Blazor and in index.html for Client side Blazo...

10 Good Habits for developers

As a developer it is easy to get caught up in deadlines, technology, product releases etc.   But if you have a few good habits, it will make your work and life much more enjoyable.   This is not rocket science, it is common sense, but sometimes we need to be reminded about them. What I mean by habit is: “an acquired behavior pattern regularly followed until it has become almost involuntary”.   You want to do these without thinking about them, you want them to be second nature.   When you regress, do not get down on yourself, just try to do them again. Habits       1.   Take breaks You need to take frequent breaks, at least 5 minutes every hour or so.   Some developers use a pomodoro timer or type of system.   You need to get up from your chair and walk around.   Go outside, get fresh air. When you are stuck on a problem, is the best time to take a break.   You will be surprised how quickly you resolve the issues afte...