I watched a great video of a presentation by @adamculp about Jenkins. I have been setting up a Jenkin’s build server for a while, but this thing can be both easy and complicated at times. The video, while great, left me wanting more of the specifics of the setup, not just “look at what this can do”. I wanted, “This is how you do this”.

I reached out to Adam on the twittersphere and he told me which plugins I needed. The one I really wanted was the Build Pipeline Plugin, and when I finally took a second to scroll down on the plugins page, things started to click. Specifically “views”. I hadn’t used them before.

Even with the instructions, I missed the key point. It says to add a new build pipeline view, so I kept clicking on New Item and not finding it. I read a little closer and looked at the picture, and it was clear… Click the “+” to create a new view.

I have been getting on a soap box a lot lately, and thought I would take a moment to put my words into a blog post. This will be a long post, but I have so much passion for this right now that I have to write it down.

I am terrible with money. I live well, but like most people, at the end of the month, the money is gone and I don’t know where it went.

My wife and I have been saying to each other that we need a budget. She or I would take the first step to start an excel document, load up a bunch of numbers, and then pretend we never saw it. Because we would get so overwhelmed, it just never got completed or looked at.

That is… until I found YNAB. Something in this program made the whole idea of managing money click for me. I don’t know why, or how, it just did. They have fantastic videos on their approach, and do it in a very personable manner.

Of course, you will still not have any money at the end of the month (at first), but I think if you stick with it… that will change.

So my challenge to you. If you are someone that knows me well enough (mostly family), and you want to try You Need A Budget, start your free trial now. You have 35 days to use it. If at the end of 35 days, you are convinced that this is for you, but you truly can not afford the $60, I will buy it for you. (Disclaimer: I have the right to turn down any request for any reason) ūüėÄ

Keep your categories simple. Track your major expenses, and if you have a bad habit you want to quit, create a category just for that. Track what you are spending and then make an honest assessment. You will be amazed that when you start budgeting and realize that to pay for that habit, you have to knowingly remove money from savings, that you may just want to stop that habit anyway.

And I like the idea of paying yourself first. Start with a small percentage, say 5%. When you get your check, let’s say it’s $100, first things first, put $5 into your savings category. Yes, you may need to use that, but do it anyway. Then when you are budgeting the rest of your money, you will have to knowingly take the money from that savings line, and put it somewhere else. Again, it’s that act of doing this that makes you aware of your money.

I am always trying to learn, and lately I’ve been working on the repository pattern via Laravel. ¬†I found myself WAY overcomplicating this, and it turned into a mess.

With that said, I think I got myself to a very happy point. ¬†All of the examples on the Internet that I have found ultimately return Eloquent models. ¬†Which, if your controller is ONLY accessing the data, is fine. ¬†But I found myself then relying on Eloquent, which defeated the purpose of the repository.

Introducing domain objects. ¬†I was trying so hard to use active record objects, that it ended up causing me issues. ¬†In the end, I want controllers to be very small and ask a domain object for the data it needs to pass back to the requestor (Web visitor, or API consumer).

The domain object is responsible for all logic (not data). ¬†The domain object should interact with the repositories, and ask for data, or send data.

The repositories are only responsible for retrieving data or saving data. ¬†They should return either arrays or plain old php objects (popo), not Eloquent, Mongo, Redis, etc… models.

Controllers ask the domain to DO something. ¬†The domain asks the repositories for data it may need to do said something. ¬†The domain asks the repositories to store some data.

Once I started following these rules, things started making sense to me.

Recently we had 2 asterisk servers that were segfaulting, and of course when that happened, all current calls were lost. ¬†This was very frustrating for our customers, our customer service reps, and of course for the us developers. ¬†It was very hard to explain, there was not silver bullet saying “X” is responsible.

So, my boss Kevin and I spent time going through log files, analyzing time lines, researching on the Internet, etc…

Our conclusion is still dumbfounding.

We recently added a new outbound sip provider. ¬†We started only giving them a small percentage of our overall traffic. ¬†During this time we saw 0-1 segfaults each day. ¬†But we didn’t even know about some of them because asterisk started right back up, and unless there was a complaint, we wouldn’t know.

Of course we got the occasional complaint, but we didn’t have an answer. ¬†All of a sudden the last couple of days was showing 4-5 segfaults per day. ¬†Some happening within 20 minutes of each other. ¬†This was very unacceptable and we spent a lot of time trying to narrow down the issue. ¬†It so happened that 2 days ago, we ramped up the amount of traffic this new provider was receiving, subsequently increasing the odds of segfaulting.

At this point, we still don’t know what actually caused the segfault. ¬†We just know that removing that carrier has so far stopped them from happening.

If you own a website that accepts money, you should be asking yourself this question.

To me, this is like asking if you should accept Yen, Euros, or Pesos. ¬†The fact is, you probably already accept these other forms of currency and don’t even realize it. ¬†Payment processors like PayPal or other gateways handle those exchanges for you. ¬†You tell the processor you want $100 for some goods, the customer pays (currently¬†10172.00) Yen, and you do not know the difference.

Same thing happens with bitcoin. ¬†Through a payment processor like Coinbase, you can easily accept bitcoin payments and immediately turn them into US Dollars. ¬†The processing fees are so much lower as well, roughly 1%. ¬†Compare that to the 3% that credit card processors charge.

Not to mention, the chance of chargebacks are absolutely zero. ¬†Because bitcoin is a push payment, the customer has to choose to send you bitcoin. ¬†You can’t take what you want, like you do with credit cards.

So the answer to “Should my website accept bitcoins?” is absolutely yes.

So, I first heard of bitcoins a few years ago and didn’t wrap my head around them at that time. ¬†(STUPID ME)

I decided to learn more about them late last year. ¬†I had lots of questions myself, and hear them from others, so I want to try and answer some of them from my viewpoint.

Questions that confused me:

What are they?

First, realize that they are not physical coins. ¬†They are digital tokens (for lack of a better word)

These “coins” are generated through mathematical algorithms at a predetermined pace, currently 25 about every 10 minutes.

Over time, the amount created will be reduced. ¬†Actually, they are cut in half every 4 years. ¬†At the beginning, they were generated at 50 coins every 10 minutes.

How are they generated?

They are generated through “mining”. ¬†It’s analogous to gold mining.

I recently heard a great analogy. ¬†If you play Sudoku, you know that the puzzles can be hard to solve, but very easy to verify. ¬†This is the key, hard to solve, easy to verify.

So every 10 minutes (or so), a kind of computer puzzle is generated. ¬†Thousands of computers around the world try to solve it. ¬†The first computer to solve it correctly, receives the prize (currently 25 bitcoins). ¬†As computers get faster, the puzzles are made more difficult, to try and keep the rate at 1 puzzle every 10 minutes.

Should I get into mining?

As it turns out, the answer is really no. ¬†Most miners are using very high end computer equipment, running specialized hardware for this.

If you do, you should participate in a mining pool, so even if you don’t solve the puzzle, you receive a portion of the prize.

If I don’t mine, how do I get them?

Turns out easily. ¬†Buy them with USD. ¬†Just like you get Japanese Yen, Mexican Pesos, Euros, etc…

There is an exchange rate, so you can exchange money for bitcoins

Barter or Sell stuff. ¬†Just like other currency, it’s only worth what someone else will give you for it.

If you are a merchant selling good and services, why would you not accept this currency? ¬†The most usual reason is that merchants don’t know what bitcoin is and they are concerned about the exchange rate screwing them up. ¬†The fact is that as a merchant, you may already be dealing with this very issue. ¬†Your payment gateway may accept Japanese Yen from your customer and turn it into US Dollars for you, without you even knowing. ¬†You can do the same with BitCoin. ¬†Coinbase is currently the largest exchange for bitcoin. ¬†You can think of them just like PayPal, but for this new digital currency.

Furthermore, there are more and more businesses accepting bitcoin as a form of payment. ¬†You can find local businesses through coinmap.org if you are interested. ¬†I’ve seen articles from other people that have tried to live solely on bitcoin, and mostly successfully. ¬†There are some obvious restrictions right now, as not everyone will accept them.

Just clearing the air here. ¬†Ranting on my personal website, with views from the way I see them.

So I had some personal business to handle this morning and was gone for half the day. ¬†I get back home and have to get to work done, so I get down to it and work with my boss to launch some new code and do other tasks.

I then find out that this morning there was a ton of drama due to the presentation on Laravel 4 at SDPHP last night. ¬†The presenter Chris A Moore (@CAMDesigns) did an amazing job. ¬†I told him right afterwards that fact, and he did what most presenters do and doubted himself. ¬†There were a lot of questions asked, that for the most part he could handle. ¬†There were a few that he didn’t know, and this bothered him. ¬†I can appreciate wanting to be able to answer them, but it doesn’t always happen that way.

He then followed up with the creator of Laravel (@taylorotwell) to get the other questions answered. ¬†Which is the right thing to do. ¬†However, he made the mistake of saying he was heckled (which he definitely was not), and Taylor proceeded to call our group a “shit user group”. ¬† This group means everything to me and for someone to put it down really offended me (and a bunch of my members). ¬†I took this personally and proceeded to tell my friends… via twitter.

Did I over react? ¬†Maybe…

Chris and I discussed this whole ordeal via IRC and he admitted to having been wrong, and he apologized to the group in IRC. ¬†I appreciated it very much.

However, because I aired this in public on Twitter, I don’t think the drama is over. ¬†And I am sure this post won’t help much….

I am very lucky in the fact that I get to work remotely from home. ¬†This comes with pros and cons, but for me the pros far outweigh the cons.

I have a very supportive wife that understands that when I am in my office (at work), that I am working and not just hanging out at the house. ¬†She doesn’t ask me to do chores, try to make small talk, or bother me in any way. ¬†I hear from far too many developers that they couldn’t work from home because their significant other wouldn’t treat it like a job.

At the same time, you have to make an effort to separate work/home life. ¬†You have to walk away for some time to clear your head and have family time. ¬†Some people that work at home feel like they are ALWAYS at work, and get burnt out.

I am employed as a 1099 contractor, and wanted to share some things to consider for people new to it.

1. Make sure your pay level is equivalent to what ¬†you feel it should be. ¬†You will be responsible for additional taxes that you have not had to pay in the past.

2. Make sure your pay is high enough to cover your benefits. ¬†As a 1099 contractor, you will probably not have any benefits being provided to you, such as health insurance, retirement, etc…

3. Talk to a tax professional right away. ¬†Don’t wait for the following tax season, otherwise you will probably be faced with some penalties. ¬†As a contractor, you have to pay estimated taxes 4 times a year.

4. Speaking of, make sure to put enough money aside to pay your taxes. ¬†The pay you receive has not been taxed, so take time to put some money into another account automatically, so when if comes time to pay them, you are not caught off guard. ¬†I have heard from some people that didn’t do this and they are paying penalties to the IRS years later.

So, I had a very strange thing happening only in chrome. ¬†Phoneburner.com has a way for people to record voicemail messages that they want to leave while making phone calls. ¬†On the page that lists them for the members to listen to before using, we do a simple object embed of a small flash player.

This has worked flawlessly for a long time. ¬†All of a sudden, we noticed in Chrome that some would randomly not show. ¬†In this one account, there are about 20 of these embedded flash players and only 3-5 would show up. ¬†The weird part is that if I refreshed, a different mix of 3-5 would show. ¬†Some would disappear, others would appear.

There were no errors in the Developer Console. ¬†I played with the flash plugins and noticed if I disabled both, reloaded the page, and then enabled the plugins all would show up…

Debugging things that don’t make sense is VERY difficult. ¬†So I went to the javascript console and decided to use jQuery to hide them all and then reshow. ¬†Sometimes that worked. ¬†Ok… getting closer, CSS may be the answer. ¬†I then tried just showing, not hiding first. ¬†Most would show, but not always all of them. ¬†But if I ran it a few times, they would eventually all show up. ¬†WTF?!?!??!!