Monday, October 19, 2020
Will Biden go down like Hillary?
Tuesday, October 6, 2020
Trump vs Covid-19
Wednesday, September 23, 2020
Computer Customer Manifesto
- I need a computer that responds.
- When I put it to sleep I move the mouse you wake up. (within a second)
- When I open up it is ready to take my login/password. (within a few seconds)
- When I hit login it takes me to the Desktop screen. (within a few seconds)
- When I hit the Windows (Start) button the menu shows (within a few seconds)
- When I hit the Chrome task bar icon it opens. (No I SSTTILL won't use your Edge browser)
- When I mouse click a URL bar you blink and ready for my text
- When I hit enter you go to the webpage I want and come back with stuff within a few seconds
And my Dell (with good ratings) simply CANNOT EVEN DELIVER THAT. (It is just 3 years old)
I don't even require you to run any games or any dev tools.
It is still $400+ bucks. Do I need a thousand bucks computer to do even simple stuff.
There is no heavy stuff even installed on it. No background tasks that I make it do. Just what the hell are you spinning about. Why you suddenly starts to work sometimes after like 5 MINUTES of churning.
Why do you spin around and demand Windows updates, so often. It needs to beg its master (me)'s permission first!
Get a Chrome book you say? Well I need a good file system. Get Ubuntu you say? Rest of family don't know how to use it. Get a Mac you say? I hate its wacky interface. I need software that makes sense like Windows Explorer not Finder. I need a simply notepad and paintbrush and you macs don't even have that. One idea I heard is get a Mac but run Windows on it with a virtual machine. Interesting idea. But how much is the Mac? and I need a valid copy of Windows? It breaks my budget.
I have given Dell enough chances.
Why is that an insult
Wednesday, June 24, 2020
Pandemic is not over yet
Friday, May 8, 2020
Math lesson in A Tour of Go
Let's see if you can crack this: https://tour.golang.org/flowcontrol/8
Ok don't like Go? use your favorite language. But I feel empowered to able to do my own square root method and not rely on Math.sqrt().
Go's syntax is somewhat between C and Pascal so far... and has pointers.
My answer:
package main import ( "fmt" "math" ) func Sqrt(x float64) float64 { z := 1.0 e := 0.0001 for math.Abs(z*z-x) > e { z -= (z*z - x) / (2 * z) //fmt.Println(z) } return z } func main() { fmt.Println(Sqrt(2)) }Note: in Go, "while" loop is spelled "for". There is only ONE kind of loop. And many modern new languages like to do the types behind, like Pascal. My Tour of Go didn't go very far. But Go's power is in its concurrency ability... the go routines and "chan" or channels, which isn't exactly easy to master.
Monday, April 27, 2020
A Look at GraphQL
Friday, April 17, 2020
Python and math
Wednesday, April 15, 2020
Python: the BASIC of today
Newer Java
class Foo { public static void main(String arg[]) { var yes = true; System.out.println("Do you miss Pascal?"+ yes); } }I can run this with just "java Foo.java". I don't even need "javac" to compile it.
It compile behind the scene and does not even produce a .class file. This is a great write up of what's from 8 to 11. https://codete.com/blog/java-8-java-11-quick-guide/... but version 8 really was the major jump. Lambda and Streams and Optional stuff are just some of them. See here for a good list.
Wednesday, January 15, 2020
Java dates old and new
// Before Java 8 (obsolete) Date date = new Date(); System.out.println("java util date now is: "+date); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // date to string System.out.println("formatted: "+sdf.format(date)); // string to date try { Date date911 = sdf.parse("2001-09-11"); System.out.println("911 date: "+date911); } catch (ParseException e) { System.out.println("Can't parse that date"); } // Java 8 LocalDateTime now = LocalDateTime.now(); System.out.println("LocalDateTime now is: "+now); // date to string DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); System.out.println("formatted: "+now.format(formatter)); // string to date LocalDate date911 = LocalDate.of(2001, 9, 11); System.out.println("911 date: "+date911);This is just part of the story... Java 8 can also do timezone a lot easier than previously.