Formatting web pages for various displays

Featured Imgs 23

First I want to say that my only interest in the technical details of web development are from an end user perspective. I usually go to this site to get my weather forecasts. Their current display format is to present the forecasts horizontally but it will likely be changing soon to vertical. My two most visited pages are the hourly and seven day forecasts. It's always annoyed me that on my display (16x9 laptop) most of the space is wasted. On the seven day page it doesn't matter, but on the hourly page it could easily display twelve hours or more of data.

But when the switch is made to the vertical format the hourly page will show only five hours of data with pointless "content continues below" page breaks. The seven day forecast shows only one day per screen. It seems to me that if you are planning, for example, a multi-day activity (perhaps a trip to the beach/cottage) it makes for easier planning to see multiple days (the more the better) on one page. For single-day events, perhaps a trip to the park, seeing more hours at once is much better than fewer.

My question (and I do have one) is, how difficult is it for the web site to customize the html for the target device? I realize that many more people would access this site on a smart phone than a desktop/laptop computer, but shouldn't major sites like this try to please both smart phone users as well as dinosaurs?

Problem with submitting new topics

Featured Imgs 23

When I create a new topic and enter the mandatory tags, the tag dialog box sometimes overlays the "Continue to the Last Step" button leaving only the merest sliver of a button to click. Could the tag dialog be aligned left to avoid this?

Is This Considered Spam?

Featured Imgs 23

We are getting a burst of posts all from IP 180.188.224.184

Wouldn't be a concern except they are all similar in content but from five different usernames (they come in pairs). Anything to be concerned about? If it was on the up-and-up, why use multiple accounts?

Jason_54    How do I choose a router for my home?
Jason_54    How do I setup my tp-link router for the first time?
aaron_30    How do I log into my Roku account?
aaron_30    Why You Must Experience Orbi Login At Least Once In Your Lifetime?
jos_387     The Millionaire Guide On Dlinkrouter.local To Help You Get Rich?
jos_387     What I Wish Everyone Knew About Router.asus.com.
david_229   Learn From These Mistakes Before You Learn Re.rockspace.local.
david_229   The Biggest Contribution Of Tplinkwifi.net To Humanity.
james_161   How do I setup my Amped Wireless Extender?
james_161   5 Common Mistakes Everyone Makes In Myrouter.local.

How do I convert a SQLITE day number to a date string

Category Image 101

I have a SQLite database that for some insane reason stores dates as the number of days since 1899-12-31. I want to create a view that will display the date as an actual date. I can calculate a specific date from a specific day number as

select date('1899-12-31','Localtime','+44386 day') as dddd

which returns the single value '2021-07-09'. Unfortunately there seems to be no way to replace the hard coded number with the 'day' column. The original table also has the data broken down by hour (thus the GROUP BY clause), and by data_out and data_in (thus the SUM) So far I have

CREATE VIEW UsageByDay AS
SELECT day, SUM(data_in+data_out)/1024.0/1024.0 AS total 
  FROM usage GROUP BY day 
ORDER BY day DESC;

Which gives me on select

DAY     total
44386   45.2344284057617
44385   35.1123762130737
44381   26.000226020813
.
.
.

I want to replace the numerical values for day with the calculated date to give

DAY          total
2021-07-09   45.2344284057617
2021-07-08   35.1123762130737
2021-07-07   26.000226020813
.
.
.

Any suggestions on how to modify my CREATE VIEW query?

User interface design

558fe5180e0e8fc922d31c23ef84d240

I found this great article on User Interfaces that I wanted to share. Two points I wanted to add

  1. Just because it's old doesn't mean it's bad.
  2. Just because it's new doesn't mean it's better.

And can we please all decide that light grey text on a white background is just retarded?

Free Technical Writing Tutorial

Category Image 073

When asked, "What language should I learn first?", my answer is always "English". If you can't communicate clearly then you can't do your job as a programmer properly. As a programmer your job does not begin and end with code. You must also be able to write documentation clearly. I recently came across two excellent technical writing modules by Google that are free for everyone. They do not take long to complete and (aside from the confusion between acronyms and initialisms) are spot on. You can find the overview here with links to the two main modules.

A lot of you are shut in for the duration of the Covid-19 outbreak anyway so you have no reason not to at least have a look.