Thursday, October 27, 2016

Apple: Stop taking away stuff

You have heard about and perhaps seen the new IPhone 7 which looks almost EXACTLY like its predecesser (ok, better camera and an idiot click sound on the home button), except for one thing: no more headphone jack. Oh what's the rationale behind that? Some say that audio jack is old technology therefore need to go. Yet to hear how good is that comma-shape headphone (which you know you will lose eventually).

Now look at new Macbook. What is new virtual key bar thing?

Oh my, no Function Keys? no Escape key?! http://www.theverge.com/circuitbreaker/2016/10/25/13409258/apple-new-macbook-pro-no-escape-key.

How do you use things like vi and emacs without it? yes function keys... are not that useful... but they were once programmable buttons. But nobody programs them now because nearly nobody writes stand-alone programs... just programs running within a program like within a browser.

Taking out things needed things is uncool. Diehard fans may call it "courageous" to "lead the industry" by removing stuff they think is no longer useful. Yes that audio cable is needed. Yes "ESC" button is needed. The diehard fans and just blindly use whatever Apple give them.

Good news is: I-will-not-use-the-Mac. Go ahead. take EVERYTHING out.

Monday, October 24, 2016

Spring things

Yes I know Spring got easier nowadays. Once upon a time I looked at the Spring Tools Suite (STS). Omg Spring has so many things (See the Projects page). Here is one thing that may deserve your attention: Spring Boot.

Once upon a time there is a guy leaving the computer and I ask hey how to build-compile-your-code-over-here. And it turns out to be a Spring Boot app and gosh I never even heard of this. So this is a as-quick-as-you-can Spring application. You don't need to create a WAR file and deploy on an app server like tomcat! It is all built in. (No more fool around with creating a blank app (that itself is hard to do without an IDE like eclipse, fool around with the servlet mapping, hijack it... make your classes with all sorts of odd annotations, fight maven dependencies to make war and then deploy).

I admire those who put tutorials on the web. I admire those who put entire project source code even more. I am able to get a great Spring Boot app running from https://springframework.guru/spring-boot-web-application-part-1-spring-initializr/. Great stuff. Even has a database hooked up for you with CRUD operations. It would take many hours to do if you have to do this by hand.

Now, the world likes APIs. If you do web apps, most likely you write your API with java to have your front end call by AJAX... and API gets messy and undocumented. Especially when you have sloppy or smart-but-sloppy colleagues who never comments anything. Every API call ought to be documented unless it is obvious what it does.

http://www.baeldung.com/swagger-2-documentation-for-spring-rest-api is pretty helpful. (Although I hope there is a entirely downloadable thing here too). Swagger is pretty awesome... It generates javadoc-like things on the fly for you and you can even try your API right there on the swagger-ui.html.

So now I have a Spring Boot thing ready for new MVC project, ready with API documentation.

Thanks to awesome helpful people who put examples out.

Exercise your right to vote - although outcome won't change

Once upon a time, I left my phone's GPS Location on. I don't turn it on unless I need its GPS to save battery and nobody tracks where I am, ok? And then it figures out I live in Illinois and it gave me a reminder: online voting registration was going to end soon! (and it has ended)

Oh I didn't go any place for registering. Waita minute I registered during last election and that voter registration card still in my wallet...perhaps I don't need to? I pulled it out and it says... 2012. Yes I only go to presidential elections. Didn't vote for anything in 2014 or other minor elections. Dang am I going to miss voting for Decision 2016? (The answer is no, I am still registered according to the online checking). You can look up yourself in https://ova.elections.il.gov/RegistrationLookup.aspx.

Ok, Illinois by any measurement is a solid blue state. Hillary will win Illinois and its 20 electoral votes. (You can save your trip to the booth). Seems like only those living in swing states get to decide who is the president, especially Ohio and Florida.

Although doesn't really matter, you can still be a small gosh small part of US History by tell someone YOU ARE FIRED by adding a count onto the popular vote.

Monday, October 10, 2016

Come on, yahoo

Ok the year was 1995. The internet was new. Websites were pure HTML and at most you have little CGI perl thing to handle a post... Netscape 1.0 was the only browser in town... and just about everyone set yahoo.com as the homepage. It was a web catalog... It had links to newborn websites as it helped people navigate around the world wide web. and yahoo email was one of the first webpage based email around...

So at an old workplace people go hey let's get an yahoo account for chatting. The year was 2001 and my yahoo email was generated and has '2001' on it... I like it never ask me to reset password I found it annoying needing to do so. Until... oh yahoo has been HACKED. See this old news. What to do? change your password of course.

But. I. Can't.

Go to the Account page, change password, it takes me to some AT&T page and nope, can't change password there.

What gives?

Why is it going to AT&T? just plain wrong. and plain does not work. Ok, I don't have any credit card info there or anything so I don't feel threatened. (I would worry a bit more if this is a shopping site like amazon)

People say yahoo is not able to keep up.. and therefore losing ground. Yahoo's search is alright... but google does it better with less annoying ads (and therefore nobody uses yahoo search now). Yahoo maps was pretty cool until google's map is even better and therefore no one uses yahoo maps now. It is unfortunate.

Yahoo even has its own library to do javascript/css! See http://yuilibrary.com/. Nope. Nobody even heard of it. People just do jquery and other things. (and YUI is dead now)

Yes, lots and lots of business lessons can be learned... about rise-and-fall of business. Even smart people can't save it... cause there are even smarter people out there? I'll continue to use your free email service yahoo... I still read your newsfeeds. I am still your user. But waita minute, how come I cannot reset that password...

Monday, October 3, 2016

Pascal legacy continues?

The guy who invented Turbo Pascal and C# now has another thing: Typescript that "compiles" into javascript. See https://en.wikipedia.org/wiki/TypeScript.. that is the basis of Angular 2.

So all the OO Aficionados who wants javascript do some OOP can do so now using Typescript translated into javascript. (well, raw javascript does support some OOP just not the keywords that C++/Java developers are familiar with). See https://learnxinyminutes.com/docs/typescript/.

There is also this NativeScript that gets me a bit confused now: https://www.nativescript.org/using-typescript-with-nativescript-when-developing-mobile-apps. Now cross platform mobile apps can be in somewhat Pascal like?

Here is the quickstart guide for Angular 2: https://angular.io/docs/ts/latest/quickstart.html.

Ok this isn't exactly Pascal like... A lot of new syntax here. Pascal/C was simple... Even javascript is fairly straightforward.

Now something that translates/compiles into javascript... why don't I write javascript directly?

Seems like nowadays you MUST install Node.js npm thing to install anything these days. Command-line thing, boom crank out skeleton-but-hard-to-understand-things. Why can't people produce something that is more straight forward. Excuse-me how do I run it?

After taking an initial look, it doesn't seem like programming mobile apps is any easier now.