Sunday, December 29, 2019

Mining

After the busy-ness of Christmas I am taking a brief break from thinky things late at night. So I'm playing a little Minetest. Yeah I could run Minecraft in Linux but I like that Minetest is open source and modding is encouraged etc. And I'm not very hardcore so I don't need redstone or other complex aspects, I just like building stuff.

And of course it's always the same thing. Moria. I like digging into mountains rather than building up structures on the ground. I've also tried to build Rapture. That was a fun challenge, trying to keep the water out etc. I'm gonna have to try that one again. But that might have to be in Minecraft, I think looking through the glass walls might look cooler. If it doesn't actually look like you're underwater then it isn't worth the effort.

I really should plan - a little - though. All of my Moria attempts end with me getting bored since I'm really just digging pointless tunnels and random rooms. They look cool, but I should have some goal of some kind. Maybe a scavenger hunt, or perhaps I do need to build it in Minecraft and use redstone etc to make underground puzzles and traps.

But wait - I'm taking a break from thinky stuff aren't I?

Saturday, December 28, 2019

A Spark in the Dark

I am still working through building a web service, and a consumer site to show it off. The consumer is not pretty. It's been years since I've seriously worked in PHP, and even then I was never super knowledgeable on PHP design patterns. Most of my work was basically imitating MVC designs. - And poorly so.

I'm keeping everything as simple as possible. The header loads all the look-up lists and assigns them to the jQuery autocomplete text fields. The specified watch loads into the main real estate. I need to fix it to do search results and other views as well as the watch detail view.

But I'm off topic. I still hate web development. I am being reminded of this dislike every night I work on this project. At the same time I've been doing some front end work during the day. I need to add a couple controls and UI logic applied to them. They are in C# and within a Telerik grid.

Due to the annoying wall between the front and back end I decided to use jQuery to apply the logic. I LOVE jQuery! It is so amazingly powerful - and enjoyable to work with. It is the one shining light in the dark world of angle brackets, tags, inconsistent style behaviour, outdated and accidental scripting languages that have been band-aid'ed into full blown languages. And then there's jQuery. A Javascript wrapper that empowers js to super human levels AND leverages the powerful selector syntax of CSS.

I feel like if js and Node merged into a single front and back end language, and jQuery merged in as well. A single POWERFUL language that makes the front end and back end consistent - syntax-wise.
And of course HTML should become something like Markdown. So much unnecessary typing wordy tags, angle brackets, etc. It's a formatting/layout markup, why not make it perfectly readable. I'm sure there's Markdown to HTML converters etc out there, but a super quick search didn't yield much.

Anyway, the more jQuery I get to use, the more enjoyable my task is.

Sunday, December 22, 2019

Simple Service

I've been working in CodeIgniter for the past couple of weeks, building a wrist watch library site. It is a great MVC framework. It actually works out of the box and it's simple and straightforward. But...
I really hate web development. The client / server barrier is super annoying, and sadly the one thing I found lacking in CI was calling a controller within a view (Like a sub view), doesn't seem to receive the data in the sub view. It can access the parent view's data, but not its own. So you either have to do full page refreshes, or load everything into the parent which could get out of hand.
I didn't want to use POSTs to interact with the backend, I wanted to allow users to bookmark ANYTHING they were looking at. But this quickly became an absolute nightmare. Finally, it became too much. I was no longer having fun.

I decided to just focus on the database. I started fresh, and this time I'm not over engineering it. Watch attributes are pretty stable. People will be searching for specific case sizes, lug widths, crystal material, etc. So I created a fairly flattened table. This makes it much easier to add items without an admin interface. But MySQL query outputs are not fun when you have a ton of fields in a table. I tried setting the output format to JSON but it was having none of it so I settled for VERTICAL output. But that kept annoying me too. And I really didn't want to just have a DB. That's kind of useless.

I decided to create a web service. I've done a little work on services at work, mainly either C# services or tweaking YAML definitions. But this is all updates to existing solutions. This would be good, building a service from scratch. I would like to do NodeJS, but so far I'm not familiar with free Node hosting. I know PHP/MYSQL hosting is super easy to find and configure etc. I decided to use PHP. So far it is great! there were a few 'head-meet-desk' moments, but now I can search the data and see it in JSON. And when I'm done, other people can leverage my growing watch database.
And so can I!
I probably will at some point.

Sunday, December 15, 2019

Ignite

All the web development I've done professionally has been done in C#. If I wanted to build a site using an MVC framework I could simply create an MVC project and the controllers, models, and views just kind of worked. In my free time I run Linux so I typically build sites in PHP and MySQL. I came up with pseudo MVC structures.

I've been wanting to utilize an actual, minimal, MVC framework in PHP etc. Every solution I've tried has either not worked for me or been too tedious to learn - this is me goofing off in my free time after all. I've recently decided to try the Code Igniter framework. It actually worked out of the box. Coding models, views, controllers, and setting up routes has been fairly easy. Most of the struggles I've had so far involve how I'm dealing with back end operations. Loading views into html elements seems to only inherit the main page's data or variables, passed to it from the controller. The 'sub' view - even if I pass it data, that data isn't present.

I'm a total Igniter noob so it's likely just my ignorance. I'll keep researching and messing around with it. When I discover anything I'll share it here.

Tuesday, November 12, 2019

Granular Collection

Granular CollectionI am currently returning to my PHP MVC application project. It is a collection of objects. The idea is to build a super granular item database / search tool. My particular implementation of it is wrist watches. I can do a pretty good search for watches on sites like Chrono24 and the gray market site Jomashop. But these have definite limitations.
For example, I like watches that are categorized as dress watches. I also like watches that do not have a date complication. With this app users can search for watches with a specified case size, lug width, date or no date and many other attributes that other sites cannot search on.

I am very new to this particular framework, however, so it'll be interesting to see how I can pull it off. I am using categories and a linking table for them, as well as an attribute table and a linking table for them. The attributes will drive the search page so it can be expanded as needed. The idea is to build a framework for collections of any number of items, not just watches.

As I make progress on this I will post the project's URL.

Wednesday, November 6, 2019

Oh the Memories

The next month or so, at work, will be mostly one project and one language ...

VB6

It is so weird coding in the first desktop language I ever learned. I remember back when I was just learning HTML and a little bit of CSS. I knew just enough to put up pages of info and horrible GIFs. I wanted to build desktop applications so I installed Visual Studio and began laying out forms etc. At the time I had no idea how to actually make it do anything, but my neat looking forms would display when I ran my creations.

Now I have nearly two decades of coding in various languages, project types, and platforms under my belt. It's interesting dealing with VB6's quirks and 'features'.

Most notable, it seems that IF statements consider every check in them, even if the first check(s) fail. At least that is how it was behaving. I had to break up the IF I was working on, nesting the second check inside the other - then it behaved as I expected. I am still able to web search any questions I have and there are plenty of topics and articles still out there. That's a good thing.

I'm guessing I'll have plenty more to say in the coming weeks and months.

Friday, November 1, 2019

Android Takes Something Else Away

Ah security. We have to use clear purses for our own safety. We can't carry backpacks, bags, etc in some places, for our own safety. We have to endure body scans, metal detectors, pat downs, for our own protection.

And now, thanks to changes in Android 10, we have to give up clipboard managers - a tool I use ALL the time EVERY single day. A clipboard manager is one of the first apps I tracked down and installed. Now, instead of allowing users to grant clipboard access like other permissions, Android has simply rendered all clipboard managers useless.

It appears that using developer tools, permissions can be granted via console on a computer (I do not yet know if this requires rooting). But I don't yet have a USB-C to USB conversion cable, so I'm stuck for now.

The feature removal trend continues. Ugh.

Introduction to WorldWeaver

A New Iteration  I've been working on the second manifestation of my Interactive Fiction engine - WorldWeaver - for about a year now. I ...