I'm stepping back from a lot of things to focus more on coding.  A lot of reasons, not many of them that I'm going to go into here.  This post is really about some of what I'm working on lately.

Things have been good lately, all things considered.  I've been being a whole lot more social, going out a lot, having fun with friends.  For the most part I'm happy, or at least content.  It's not like I'm feeling bad or being depressed or anything like that.  People shouldn't be worried or anything.

But the thing is, I've been doing a whole lot of thinking lately, about what my priorities should be and what I'm getting out of being more social.  Sure, I'm mentally doing good, my therapist kept saying how I'm doing great, taking all sorts of social risks, whatever.  But the thing is it's really a lie.  I don't want to be social.  Or maybe I'm being social for the wrong reasons, hoping that I'm going to meet someone who I can love and care about.  Going out to parties, races, potlucks, in the vain hope that it will lead to something is just stupid.  Sure, it's great to hang out with my friends, but it's not why I'm actually leaving the house.  It's not why I started drinking again.  So really it's all based on something false.   I guess I've always known that, there were just a few things in the last couple of years that gave me faith that maybe things could be different.  But deep down I knew the truth, and now I'm going to make a real effort to live with that reality.  A lot of little changes, a few major ones, and trying to change my focus away from a stupid thought that I could be something I'm not.  The last 6 years have been a pointless experiment, and I've known the results for a long time but simply haven't accepted them.

So I cancelled all the rest of my therapy sessions.  I had thought that they were 65 dollars, but found out they were 120.  On the bill from the clinic they say that's all covered by insurance, but then my insurance sent me notices saying that some of it is 'provider responsibility' and some of it is mine.  Pretty sure that means that I'm going to end up paying the whole thing.  Just going there and hearing that I'm doing good is pretty pointless, and way too expensive.  I'm sure I could find a cheaper place to go but I really don't think it's worth it.  Nothing is ever going to change about me, so why try?

Today I added a rewrite rule to my hosts files on my desktop and my laptop to block facebook and point it at localhost instead.  I was spending way too much time on there, it was pretty much a constantly open tab at work, and at home.  Plus notifications on my phone.  I tried to delete facebook from my phone but apparently you can't do that without rooting it, so I will probably do that this weekend.  Some of my friends probably think that I'm taking a break from it because of a post that autopublished when I signed a petition last night.  I'm very anti religion, and they all jumped on me as if I was the antichrist for saying that a senator should stop down from office and go meet his god as soon as possible.  He said that he didn't believe in the big bang, or evolution, or any of that stuff.  He also sits on the House Science committee.  I find that reprehensible, and horrible. 

Fact of the matter is, it's not anything to do with religion or the fact that so many people I know are deluded and believing in things that simply don't exist.  Trust me, I know exactly what it's like to believe in things that aren't there.  I thought for sure when I was working on bike love that I was on a mission that could not fail because it was basically fated to happen.  There was no way it couldn't happen.  That ended up with me in the mental institution.  There have been other times, when I thought that everything that I saw was a sign that I was supposed to be with someone, yet the truth of the matter was that I was simply crazy and imagining things.  So yeah, I really don't like it when people put things on 'faith' no matter what the reason.  But of course, that means I'm being 'intolerant.'  Fuck yeah I'm being intolerant.  When people try to move into positions of power in the government to advance their religious beliefs, it makes me very angry.  I don't even like it when someone tries to hand me a damn pamphlet on the bus.  I'm supposed to be OK with everyone on the planet believing in bullshit books from thousands of years ago that don't mean anything.  Because it makes them better people?  Bullshit. 

Anyway, that's not why I'm disconnecting from social media and social functions.  Sure, I have a LOT of hate for religion.  And most people that are religious.  But that's not it.

It's a lot more to do with the fact that I want to focus on things that actually matter for awhile, things that I need to do in order to get where I actually want to be.  Potlucks don't matter.  Bike rides and races don't matter.  Backyard fires don't matter.  Dinner dates with pretty girls who don't actually want me don't matter.

What does matter is getting a lot more money.  What does matter is getting more time to work on projects that I want to work on.  My non-compete with mplsbikelove.com is also up now, I can finally move forward with what I want to build on bikelove.org.  Yet I haven't actually been working on it at all for the last two years.  I could have just kept working on it continually, but something in me shut down after the sale.  Part of that I think was the mistaken thought that what was really important was to really love and be with for someone, pretty much the only person I felt still wanted to know me after everything fell apart.  But the more I look at it, the stupider that was.  And then I continued on with that thought, that what was important was finding someone who really wanted to be with me, that approaching life should be a joint effort, that eventually someone would want to go the same direction as me.  The last 36 years have shown me that's never going to happen.  Probably that's all my fault, everyone tells me it's my fault, I guess I should start believing them and just give up.

You'd think that would be depressing, it's really not.  Maybe that's the new meds.  I don't know.  In some ways, it's liberating. 

On the other hand, what I've been doing as far as coding has been progressing by leaps and bounds.  Some of the clients that I've brought in have started sending a lot more complicated jobs, and as I've started in on them I've been learning a whole lot more about programming.  What I know about object oriented coding in php has jumped up a few levels in the last 3 weeks or so, I feel more confident than ever about my skills.  I've been doing things far beyond what I've ever done before, and each piece keeps leading to more knowledge and skills.  There's SO much more that I want to do to continue on these lines.  The way I'm thinking about everything about coding in c5 is changing a lot, where I used to think that I had to pretty much use page objects for everything now I'm creating my own database objects and listing and filtering them across multiple tables.  I'm creating dashboard pages that are actually completely integrated with the CMS, using the built in functions to load search results via ajax and sort results.  It's just a couple more steps to finally understanding how to create my own categories for attributes and attaching them to these classes, then using the built in functions to allow adding and removing columns from the search results and filter fields.

It's really exciting feeling how close I am to finally getting several things that I have been trying to understand for a couple of years.  I knew the basics, I could modify existing code, but figuring out how to write my own to do these things that the main cms does was beyond me.  It feels like a whole new world has opened up, that I could literally code anything that I wanted to without a lot of effort.  Of course, coding this way is a lot more complicated, there are a lot more files and a lot more classes and a lot more to think about, but at the end, it makes each piece a lot simpler to maintain and extend.  It allows a lot more functionality in the end, too, a whole lot more code reuse as well.  So it's really imperitive that I figure out the next couple of pieces to the puzzle, and finalize the pieces that I do know into things that I can bang out in a matter of hours from a template rather than spending a few days writing every line of code by hand.

So many ideas, really.  So many things I want to code for the marketplace.  Now that I think about it, a composer based blog with search functions and a dashboard interface should be super easy.  Couple that with the code that I have to break posts with the pagebreak button in tinymce instead of stripping out all formatting or using the 'description' field and you have something really awesome.  Add in the code I have to use oembed to replace urls for flickr and youtube and several other major sites and you have something really unique.  I've done wordpress imports for it as well, if I can get that a bit more workable so it's usable by almost everyone.  Adding in maybe a 301 redirect attribute or .htaccess entry for the old urls from the wordpress site.  There are several things that I realized after trying to convert the greaserag.org site that make me kind of not want to do it again, but then again, I might be able to make it into an actual usable marketplace add on.  It's again, something that I kind of crashed on.  After not gettting everything right on greaserag.org I felt like I'd failed at figuring things out.  A few weeks later I thought of how to fix it, but it was too late for that site.  I still had problems like the links leading back to the original wordpress.com domain.

There were other things that also really bummed me out about that site.  The main one was the site was super slow.  I spent about 15 hours so far working on it over the last few weeks. Last weekend it was about 12 hours simply trying to make the site faster.  There are a lot of great things about concrete5, but there are a lot of downsides, too. Speed can be a big one of those.  For greaserag.org, it was the page lists for the archives and categories that were taking the longest to create.  It was I think close to 4 seconds for the archives and about 2.5-3 for the categories.  But not everywhere, you would only see it when you were on the home page or under lowrah's blog where there were hundred of pages were making the site load really slow.  When you needed to loop over a list of hundreds of pages and rearrange them into a year / month / post heirarchy it would take a ton of time.  It seems like there should be some page methods that would make that quicker, maybe inYear($year) and inMonth($month) function to make sorting easier? 

Also, I learned that the sorting on page lists to display links to search forms by select actttribute could be improved a lot. I had kind of just been copying code from other developers that was using either a call to see if this works :

if (method_exists($akc, 'getOptionUsageArray'))

Then if it doesn't exist, it runs a loop over the collection array from the page list.  That's maybe a problem with some other add ons.  But really, you don't need a page list cArray at all for this particular view.  Pretty much all you need is a parent page ID. When I added in the add on Blocks By Ajax - it allowed for a lot of changes to the controller and view to change how things loaded on the pages.  I switched around the way that page lists sent back their data for pages for both the block_list and page_list blocks.  Instead of the on_page_view function calling the get_pages function on the block controller, I moved the get_pages call to the view of the block.  Then when I loaded the view only via ajax after the page had loaded, I saved several seconds.  Doing that also changed around the call for the page list in the categories block.  Originally, I had set it so that if you set the block to display 10000 pages, then it would show them all if you didn't have the page method getOptionUsageArray.  But the thing is, the versions of c5 that I was using were too modern, there would never be a false return for that method_exists call.  So at that point, you are still pulling in several hundred pages and looping over them, even though you could simply move the call to get the pages to the view.  Then in the view on the categories / tags view, you simply don't do that call.  This also cut several seconds off the execution of the page.  Making a new block that was just a option list and search links instead of being based on a page list would be much better also.

I'm not entirely sure, but it seems like I saved from 75-90% of the load time on the pages for the site.  That's a lot. 

Part of what I next need to do on it is trying to get it upgraded to use a different calendar system.  Currently it uses Items Calendar, but that doesn't have the best options for repeating dates.  I took a look through the code on each, and I think Pro Events is going to be a lot better, and also easier to integrate with the User Blogs platform.  Items Calendar is powerful, but it's lacking in a lot of key areas like the dashboard interface.  Pro Events also has some things that I'll have to change, like displaying aliased pages and trying to allow for more than one setting for colors on calendars. But modifying either to do what I want it to do has never seemed like a challenge.  The only thing I don't like about customizing things for client sites like this is not being able to upgrade.  I wish there was a better way to merge overrides into add ons.

It seems like every add on I get from the concrete5.org marketplace is kind of like that, they all work but sometimes there are limitations, and things that could be improved on.  At work they almost all need slight customizations to make them fit the site IA and design.  Thankfully, almost all the developers there are willing to accept code patches and suggestions.  I've posted dozens of support requests where it's not just "hey this doesn't work" but it's usually "hey, this doesn't work, but here's why and how to fix it."  I really like that.  I wish there was a more collaborative environment, where maybe you had several different developers working on the same add on and sharing the profits or something.  I guess, maybe I should look into doing things like that eventually.

But yeah, I'm shutting down for the winter at least.  I may still come out for stuff, I haven't actually disabled any of my accounts on social media.  A half a second on a terminal window would allow me access again.  If I disable my account on facebook I have to also stop a bunch of applications that I'm administrator on so I didn't do that yet.

In other news, I've changed how I sleep and I've been sleeping much better.  I had been taking my meds at night to make the mornings better, that led to not being able to sleep at night. I went weeks with maybe 2 hours of sleep a night, not tired, not manic, not anything, just not sleeping.  Now I'm back to mornings for the meds and kind of able to sleep at night.  A bit.  I'm still maybe 4-6 hours at most, it was down to 2-3 hours.  It's weird to lie there not sleeping and then get up in the morning and not feel tired, to not feel really much of anything.

I am also trying to change how I sleep.  Since I moved into this apartment, I now had a bed instead of a futon, so that's where I slept.  It was a large bed, enough space for two people.  I don't know why, but I have always kept two pillows on the bed.  One for me, one for some person that probably won't ever show up to use that extra pillow.  I got rid of the other pillows on my bed this week, too, now there's only one, and I sleep in the middle of the mattress instead of on one side.  Sure, it's a little thing, but I think it's significant.  I don't want anyone, because there's nobody even close to worth my time or effort, and there's nobody that actually wants for me to like them. 

I'm done with people.