Skip to main content

Posts

Showing posts from February, 2016

Magento 2

I downloaded and setup a Bitnami virtual machine for Magento 2 over the last few days.  I'm going to start looking into what it takes to make extensions for Magento.  I have worked on building an extension for Magento 1.9 in the past, but I didn't get it finished.

I would like to build a few of these extensions and put them out on the Magento marketplace.  From what I have seen so far it is very easy to extend and modify pretty much any part of the way Magento works.  My knowledge of php is somewhat limited too, so I am looking forward to getting into more depth with a language other than Coldfusion.  I am just getting started, but the way Magento works seems very interesting.

MySQL Ignore Index

I had to use something in a MySQL query last week that I haven't needed before.  IGNORE INDEX  I was aware that you could do this sort of thing, but I don't recall ever using it or seeing it in use before.  I have a query that joins a couple tables and looks for records with a particular foreign key value.  For some values of that column it was using an index that I added specifically for this query.  This was taking 1-2 seconds to run.  For other values it would use a different index and take 25-30 seconds to run.  I added an IGNORE INDEX for the one that I didn't want.  Then it started using a different index that had the same problem, so I had to ignore that one too.  Now it seems to be working quickly for all values and using the index that I want.  In most cases I have found that the database is pretty good and finding indexes that work best, but I guess not in this case.

Adding Google AdSense ads

I added google ads to my blog today.  This was very easy.  I already had Google AdSense setup on my account so it just took a minute to link the account and select a layout that works.

I also added ads to my main site mattdyer.us.  That site is setup as an AngularJS 2 site.  I am just getting started setting it up.  I was able to just put the ads in my main html file though so I didn't have to worry right now about whether they would work well with an angular site.  Adding those ads was also pretty easy.  I spent most of the time just playing with a layout to get a nice side bar and a main area for content.  I also did some reading about routing in Angular 2.  Hopefully now I can start adding some other pages to my site.

Trolley Problem Thoughts

A few days ago I read about the trolley problem.  It was mentioned in an smbc-comics.com comic.  I hadn't heard of this before, but I have considered similar situations before when thinking about driverless cars.

When I thought about it the ideas of social class came to mind.  Would you be less likely to throw the switch if the five people on the current track appeared to be homeless, or possibly drug users, and the single person on the other track was perhaps a railroad worker.  It could matter how long you have to make your decision.

Previous thoughts I have had involved driverless cars attempting to save their occupants.  Given a choice should the car run over pedestrians to save the occupants of the vehicle.  For example if the car was unable to stop in time should it choose to go off a cliff killing the occupants, or run over some number of pedestrians and stop safely.

I think current driverless cars would probably go off a cliff to avoid colliding with the people, but probab…

Service worker exploration

About a week ago I took another look at service workers.  I looked at them once before but I only got as far as getting one registered.This time I got a little further.  I'm thinking of building a module that would allow easily doing some offline caching and other things that are possible with service workers.  I think building something like that would be a good way to learn all about service workers.

Angular 2

I setup my first angular 2 site over the last few days.  I started with the js version of the five minute quick start.The site replaced my old mattdyer.us site.  It is now hosted on github sites.  There are only a few files.  I haven't gone too far beyond the example site yet.I'm hoping the site will continue to grow now.  I've got a lot of ideas for things ro work on.