Going Primal: Day 1 and Day 2

So we started our primal venture on Saturday.  We thought with a three day weekend it would be a good time to get started.  Well we forgot one thing.  A holiday!  But I’m a head of myself.

Day 1 – 5/25/2013

Weight: 224.2
Belly Measurement: 40 inches
Chest Measurement: 39 inches

My wife, who is doing this with me, and I have told ourselves that we won’t be stepping on the scale until we hit Day 21.  Realistically we are looking at this as a life style change.  I want something where I can eat and be a reasonable weight.  I enjoy working out, but not as much as I used to.  Love going for walks with my boy and the dog.  Occasionally I like to do an all out sprint and occasionally I like to lift some weights that make me feel a bit more manly! But more than anything I want a life style that’s going to allow us to be fit and active.  I’m really hoping that once we get the eating portion down I’ll be more interested in working out in some fashion.

Eating was not really that bad on this day.  I felt a bit more tired and took a nap, which is kind of normal for us on the weekend.

Day 2 – 5/26/2013

Things were going great.  Had a good breakfast, had a lunch that followed primal and then the phone call arrived.  As I mentioned up above this weekend is a holiday and many (most?) American’s celebrate holiday’s by eating.  And not one to be left behind we joined in. So day 2 we ate primal 2/3rds of the day.  The last part was just gone.  But I don’t feel guilt about it.  That’s one of the first things that Mark talks about in the primal diet.

“Perfection is impossible, but striving for perfection is possible”.

It’s the old 80/20 rule. So this was our 20 for a few days.  Today, the third day, we are back on track.

Onward and upward!

PyroCMS: Getting a WYSIWG text box in your module

I know I said Pyro would be put on the back burner for a bit but I ran across something that I think is worth sharing.

So working on my module and I wanted a WYSIWG editor in the admin portion.  Took a look at the blog module that’s part of core and saw that there needed to be a style associated to that textarea. So I did that, but it didn’t work.

Long story short you need to put this in your controller when your view is loaded. So you’d have something like this when your view is loaded (you also need to have a style on your textarea box as well).

$this->template
->title($this->module_details['name'])
->append_metadata($this->load->view('fragments/wysiwyg', array(), true))
->set('foobar',$foobar)
->build('admin/edit');

As near as I can tell this isn’t documented anywhere. I also suspect there some other ‘root’ level libraries that need to be loaded for your development purposes.

Code on!

Getting Primal

I’m not really sure how many people read this for my commentary on PyroCMS, but I’ll be taking a break from that for awhile.  I’m still developing and am working hard on a project at work that is using Pyro, but for now I plan on posting some other stuff that interest me. 

I’ve been interested in fitness for a long time.  I rode a road bike for a few years, did a few races, rode a couple of centuries (100 miles in a day) and looked like a skeleton. When I decided that it was taking to much time, I got into running.  Never was that good at it but I did get a 5K at a little over 23 minutes.  After running I took up powerlifting/strongman.  That I enjoyed and did for quite awhile and then I moved. Since then I haven’t found a good workout program and I’ve put on the weight.  And I need to get rid of some.

It’s a bit of vanity and some of it is for health reasons.  So I’m going to do the The 21 Day Primal Transformation.  This, if your unaware, is something that Mark Sisson over at Marks Daily Apple is leading (not sure if leading would be the right word, but perhaps).  And as I’m not very good about following through I’m planning on documenting the process here.

So there you have it.  I’m not 100% sure what this will include, but it’s my hope that it will give someone a glimpse into the process and keep myself accountable.

PyroCMS: Take some time to explore

I finally made it back into some PyroCMS development today (and a little yesterday).  Today I really got into it and got some good time into my work project.  First I must say I’m a programmer that likes to get shit done.  I know on my first go around with code it’s not going to be the prettiest, but it will be functional.

So I was working on some models in PyroCMS and I had seen some stuff that I was curious about so I went exploring.  If you go into system/cms/core there’s a MY_Model.php which is what all your models will be extending.  Long story short there’s some helpful queries that should allow you to not have to create your own (ie: get_all() etc).  Having said that, I was not able to get it working in my application.  Again I just want to get shit done (feel like I’m a bit behind the gun right now), so I moved on (gave it a couple of good tries however).  I’ll go back to it at some latter point and write a bit more about it but for me it’s a golden nugget waiting to be explored and mined.

One of the things that I’m writing needs a multi-select dropdown.  Actually a couple of them.  So I got the results I needed and created my foreach loop (I find the CodeIgniter dropdown form helper damn near useless…I’m probably missing something, but the data I want to display is NEVER in the format that the function wants, so I just do a quick loop).  Any how once I’d got my code and loaded the page I was blown away.  I’ve had my differences on some of the PyroCMS stuff (file module in particular), but this little thing made me forget everything and shoot Phil a tweet and say thanks. I’m easily amused, but it was one of those moments for me where I was like “this is great…what else can I find and will the developers come up with”.  Give it a look when you get a chance (set a <select> to a multiple)

What little nuggets have you found in PyroCMS that made you fall in love with it?

Lastly I’ll be purchasing my first professional copy of PyroCMS this week for a site we are working on.  It will be our first PyroCMS site that is released.  Once it’s released I’ll post up something about it for all to check out.

I hope to have a bit more to post about rather than just rambling, but who knows.  The weather here in the west has finally gotten nice so there’s less time in front of the puter, unless it’s work related!

Happy coding all!

What’s your perfect work environment?

Having the perfect work environment has always been something I’ve striven for.  I’m not sure why that is, perhaps its because I’ve mostly worked in brick and mortar business’s and I see ‘new business’s’ that have these kick ass environments.  I think the other side of it is the fact that we spend so much time working away from our homes and our families that it sure would be nice if we were spending it somewhere that was a bit less sterile and more welcoming.

So here’s my perfect work environment. What’s your’s?

  • Standing desk – After 15 years of working at a desk my back is starting to hurt me.  And I do try and make an effort to get up and walk, but it doesn’t happen all the time.  
  • Ability to shut myself off from the world around me.  No phone calls, shut off the e-mail and no stop by and fix my problem.  
  • Collaboration.  Despite my want up above this I want the ability to work with other people and get stuff accomplished.  I like shooting the shit like anyone else, but I want to get something done and I want to grow by bouncing ideas off of other people. I don’t want a ton of people, just the right amount! I should add that they should also be passionate about it.  I see WAY to many people who just want to ‘press the button’ and be done with it.  
  • As an overall look and feel I like the industrial look.  High ceilings, no drop ceiling.  Pipes above your head.  Old brick walls and wood floors.  

Your turn. What’s your perfect work environment?

PS: I will be getting back to PyroCMS development commentary this next week and will have some more to say, I hope.  So sorry for being a bit quiet as of late.  Due to not having the above, it took me about 4 weeks to get some data imported parsed and into a database that I can now work with (doing some work that would have needed to be done now or later…I did it now!)

Thoughts on mobile/responsive sites – more than 20%?

Over the past couple of days I’ve been listening to Pat Flynn’s latest podcast called, Go Mobile or Get Left Behind with Greg Hickman of MobileMixed.com, and it’s got me thinking a bit about mobile.

I think we can all agree that a ton of us view information on our phones.  I know I do.  At first it didn’t annoy me to go to a site that wasn’t responsive or had a mobile portion, but now it does. Especially if I’m clicking there from Twitter or Facebook.

On the flip side Pat mentioned that his SmartPassiveIncome.com site, at the moment, is only getting 20% traffic from mobile devices.  This is also what I see on my companies site as well. Granted it’s only two sites of how many billions out there.  I would take a guess that most websites fall into this range.  Not more than 20%.  My last thought is that if mobile is so ‘big’ as everyone keeps telling us what is it going to take to get over that 20% for those sites that aren’t specific for mobile?  Something else one could extrapolate from this is that perhaps the 20% we are seeing are from those people who are on personal mobile devices and the other 80% is from people who are browsing from work stuck in front of a desktop!  Now that’s even more scary if you think about it (perhaps just from a business owners perspective!).

Where to find support for PyroCMS

I’m indirectly working on something with PyroCMS, but not diving into Pyro at this moment.  Once I do get back in there I’ll be posting some thoughts on that. 

Everyone, no matter what your level or experience of programming is going to need some support at some point.  And with Pyro being a fairly new CMS to the game I thought it was worth while posting something about where to get support.

  • Forums – Most obvious and I try and do my best to help out on there.  However I do see some posts go without any comments on it which is why I wanted to give a second opinion. 
  • IRC – There’s a few people that hang out on the IRC channel, sometimes the core devs, and you might get some response here if you need something quick.  

These two are the areas I would start with. There are a couple of Facebook groups for Pyro, on public and one private, that can be helpful as well should the first two no prove successful.

I have my next post in mind.  I’m not sure if I’ll post it up as it might be a bit controversial.

Anyhow happy coding!