Thought and Freedom

Articles for those who think. By Terry Pearson

Archive for the ‘Programming’ Category

Transferring GoDaddy hosting from one account to another

without comments

I recently ran into a problem transferring GoDaddy hosting from one account in their system to another. It appears that domains must be unique across the entire shared GoDaddy system.  I decided to write a quick article on how to prevent downtime with such a transfer.

So for future reference, it may be beneficial to do this if you need to transfer from one GoDaddy hosting account to another:

  1.  Create a new temporary subdomain A record pointing to the new hosting server (i.e. my.domain.com).
  2.  Setup hosting on new hosting server for the temporary subdomain.
  3.  Setup an apache site on another non-godaddy server for the main domain.
  4.  On the non-godaddy server, setup a temporary redirect from the main domain to the temporary subdomain (www.domain.com->my.domain.com).
  5.  Modify the DNS record of the main domain to point the non-godaddy server.
  6.  After propogation, cancel the original hosting service (or change it to another domain on the account).
  7.  After cancellation is finalized (48 hours), modify the main A record to point to the new GoDaddy hosting account.

It is unfortunate the GoDaddy has to enforce uniqueness in hosting names because it forces a massive outage on those wanting to transfer within GoDaddy. As long as your instance is on a different server, it should not matter too much (I know there are technical issues, but it is something that could be fixed with a different setup behind the scenes.

Written by Terry Pearson

December 29th, 2011 at 4:10 pm

How to do a cross site scripting attack

without comments

Have you ever wondered what a cross site scripting (XSS) attack is all about? OWASP rated such an attack number two in their top ten vulnerabilities of last year.  View the video, then defend yourself against such attacks!

Written by Terry Pearson

November 1st, 2011 at 4:30 pm

Intellectual Property Reform

without comments

Patent TrollOur patent system was originally designed to encourage innovation. Therefore, we gave people legal protection against their works being copied for a short period while they recouped their investment.

The thinking behind it was that this would allow the inventor a time period to open up his distribution channels and establish himself as the market leader before the more established companies came in and copied his idea.

Since communication and transportation systems were in their infancy, governments granted longer durations of patents and copyrights. After all, your new widgets might take months to just make it over to the other side of the country. But today we have the internet, we have airplanes, we mass ship merchandise in shipping crates. The fact is that distribution channels are much faster and more efficient than they were a couple hundred years ago.

Unfortunately, the patent system has not kept up. In fact, it has turned into a method to force out the little guys. There are entire patent trolling law firms (when malpractice laws went into place, many lawyers chose to move to “greener” pastures like frivolous patent suits). There are even very large companies that make most of their money by enforcing frivolous patents.

Almost every tech firm in Silicon Valley gets sued for some type of patent infringement. Companies are sued for simple things like using a double click, or creating an easy to use interface on a digital music device. The fact is, the IP system (intellectual property) has morphed into something it was never meant to be.

There are a few things that can be done to reform intellectual property laws. Here are a few:

Patents

  • Shorten Patent Length – 3 year term from filing date (10 year term on medicine due to FDA approval process)
  • Limit standing to sue to companies who actually have a product fulfilling their patent (No real product? Then you cannot sue).

Copyright

  • Shorten term to 10 years since modern printing and digital distribution methods are faster.
  • Cannot sue for more than the market price of distributed material.
  • No renewals. After term, it goes to the public domain.
  • Derivative works are considered unique.
  • Repeal DMCA and exit the World Trade Organization (since they require U.S. laws to comply with their regulations)

Trademarks

  • Should be limited in nature.
  • Very specific, not general. (i.e. A white swoosh looking exactly like this)

Another option

Of course, companies could choose not to copyright or patent at all. Instead they could hide the “trade secret,” making it impossible for other companies to copy their idea without reverse engineering.


Conclusion

These reforms would give inventors that initial edge without being too restrictive on innovation. We need an IP system that accounts for reality. People will only respect a system as long as the demands are reasonable. Perpetual copyrights and  patents on general ideas are not reasonable. This is a better way that will not only encourage innovation, but will cause it to flourish.

Written by Terry Pearson

October 11th, 2011 at 2:30 am

Why does college cost so much (And is it worth it)?

without comments

Why does college cost so much?

There are several factors influencing the cost of college. Many of these interlocking factors seem to be catalysts for other price increases. The whole price issue with colleges is such a mess because there are just so many factors. As such, nobody knows who to blame, which makes it a tough issue to fight.

A few factors that contribute to cost include:

  • Text Books – Considering the fact that many text books are just regurgitations of existing writings, mixed up in a different form, there is absolutely no reason the book should be worth $200. Take, for example, a calculus book. Nothing has changed, in regards to the information, yet the publisher forces us into a new edition by rearranging a couple chapters and swapping out a few math problems. Overall, no new value is added, but the company comes out pretty good.
  • Labor costs – Professors and staff are sometimes overpaid for the value they provide. This is especially true when you add in benefits packages, tenure, and so on. It is true that some employees are paid less than they are worth, but these are usually the exception. Auxiliary staff consume large amounts of resources as well.
  • Freely available student loans and grants – The readily available student loans create an upward push on the education market. Since the loans are neither tied to actual performance or to the student’s value (in terms of career wages after school), vastly more loans are issued than should be issued.

Is college worth the cost?

As a guy who went to a few colleges myself, I’ve had some time and experience to think about the true value of college. There are parts of college that are very valuable if it makes sense in your career path. Then again, there are many, many, parts that are less than useful. They simply consume precious resources that you will repay after graduation.

Outside of the fact that most employers demand a degree, there is little need for college in most circumstances. A high level tech school, or an intense on the job training program would do a much better job preparing an individual for life than a college degree would do.

There are hundreds of thousands of waitresses and parking lot attendants who worked hard through college and are now paying off a lot of debt. They would have been much better off skipping college and forgoing the debt.

Entrepreneur Peter Thiel, who made his fortune building PayPal and Facebook, is so eager to wake people up to alternatives to college that he’s paying students $100,000 each if they drop out of college and do something else, like start a business.

Even in my field (programming), there should theoretically be little need for college completion. Mark Zuckerberg, of Facebook, echoed this sentiment when he would recruit people away from college. Why program in a classroom, when you can do the real thing right now?

Mark was right. In reality, the best programmers got that way outside of the classroom. Computer Science classes can be beneficial, but if you want to find the true superstar programmers, you need to look outside the classroom. Look to the open source coders, the hackers, and the innovative individuals that code not because they were told to do so, but because they need to invent, create, and build. Here, you will find your best “workforce,” whether they have been to college or not.

So, is college worth it? That is a question for you to decide. I lean towards “no,” but given society’s aversion to individuals who buck the system, it may be necessary at times. Check out the video and also let me know what you think about the matter below.

 

Written by Terry Pearson

September 6th, 2011 at 6:00 am

Programmers that you need to follow on Google Plus

without comments

So you got an invite to Google Plus, added friends to your circles and now you religiously check for updates every 45 minutes. Maybe next time you’ll see a new post.

In the interim, try adding some tech guys and gals on Google Plus that may interest you…

Amon RA

Android programmer from Belgium. He was the creator of the Amon RA recovery (Similar to Clockwork) that helped so many of us with our early android devices.

Terry Pearson

Advanced Venture Solutions: PHP and Java developer. He happens to be someone I know well ;-) Putting out information about technology, programming, Android, and political opinions.

Larry Page

Google: The most famous Googler. Of course we were going to include him.

Steve Kondik

Cyanogenmod: Founder of one of the most famous custom Android Operating Systems, this is Mr. Cyanogen himself. They currently have half a million users and growing!

Trevor Pearson

Advanced Venture Solutions: Architect of some amazing PHP and also my younger brother!

Andrew Mason

Groupon:Andrew is the CEO of the now world famous “Groupon.com.”

Patrick Norton

Tekzilla: Cohost of the show called “Tekzilla” on Revision3.com. While not technically a programmer, still an incredibly interesting technology infulencer.

Brian Cohen

BitTorrent: Inventor of the BitTorrent file sharing protocol. Despite what people say about the “bad” side of bittorrent, this has to be one of the greatest concepts in distributed computing since the invention of HTML. It has some incredible uses, especially downloading Linux distributions.

Do you have other programmers and/or technology experts to add? If so, leave a comment below. If you are a programmer and would just like to connect with other programmers, post a link to your profile in the comments as well.

Written by Terry Pearson

July 20th, 2011 at 6:53 am

Introduction to Git

without comments

I just watched a very useful tutorial on the version control system called “Git.” The sound quality could be better, but the content is superb. Check it out below…

Written by Terry Pearson

July 19th, 2011 at 6:32 am

Posted in Programming

Getting the number of lines in a text file

with 5 comments

This may be something trivial, but it saves me some time…

Today I wrote a quick VB Script that will count the lines of a text file. This could be useful if you need to quickly verify that some program is outputting the right number of lines to a target file. You can also place it in your windows path location. Then just type “lines filex” from the command prompt to instantly tell how many lines exist in a file (where filex is the name of your file).

Windows Scripting File Icon

files.vbs

I have tested the script on XP Pro SP2 and Vista Home Premium Service Pack 1

Anyway, I find it useful while working on test cases at work. Sometimes, its the little things that save you lots of time.

To use the script, simply drag and drop any text file to it. It will pop up with the number of lines.

Written by Terry Pearson

September 23rd, 2008 at 9:09 pm

Posted in Programming

MySQL Server Has Gone Away problem solved

with 10 comments

I was just looking at RobsNotebook.com and came across a really good solution to a common problem with WordPress.

Lately, I have been getting a lot of error messages on my blog that said “MySQL server has gone away.” I looked through the Godaddy support forums hoping to find a solution. Unfortunately, I did not.

But then I found RobsNotebook.com and they had a page dedicated to this problem. It turns out that it is caused by the SQL connection being open for too long. Essentially, WordPress does not close the connection every time.

Godaddy’s (or insert your own host here) configuration of MySQL tells it to time out after a certain period, and that can happen in the middle of your call to the database.

RobsNotebook.com has provided a php file that you use in wordpress and just replace your existing file. He made it so easy that it takes only about 5 minutes to put in the solution.

P.S. I verified that the php page was correctly coded and had no “funny business” on it, but as the file could change at any time, it is always good to look through it for yourself whenever you download and use PHP from the net.

Written by Terry Pearson

February 29th, 2008 at 11:48 pm

My List of Accomplishments… And you should be proud of me!

without comments

I think that sometimes I know exactly how Wally feels in this Dilbert Cartoon! If you ever had one thing lead to another with an upgrade, you will know exactly what I mean.

I guess you could say this is kind of like “Feature Creep,” only one might call this “Upgrade Creep.” What started as a simple software install, soon progresses to a mother board altering 13 ring circus.
Why does upgrading a computer take so long?

Written by Terry Pearson

January 19th, 2008 at 12:09 am

Hiring the best programmers

with one comment

In case you are in the market for hiring programmers, or you are a programmer looking to improve your resume (a.k.a. cv), you will benefit greatly from reading Inter-sections.net’s article on finding good programmers.

I have included their bullet points below, but for more details, check out the whole article. It was written well, and contains a lot of good advice.

Positive indicators:

  • Passionate about technology
  • Programs as a hobby
  • Will talk your ear off on a technical subject if encouraged
  • Significant (and often numerous) personal side-projects over the years
  • Learns new technologies on his/her own
  • Opinionated about which technologies are better for various usages
  • Very uncomfortable about the idea of working with a technology he doesn’t believe to be “right”
  • Clearly smart, can have great conversations on a variety of topics
  • Started programming long before university/work
  • Has some hidden “icebergs”, large personal projects under the CV radar
  • Knowledge of a large variety of unrelated technologies (may not be on CV)

Negative indicators:

  • Programming is a day job
  • Don’t really want to “talk shop”, even when encouraged to
  • Learns new technologies in company-sponsored courses
  • Happy to work with whatever technology you’ve picked, “all technologies are good”
  • Doesn’t seem too smart
  • Started programming at university
  • All programming experience is on the CV
  • Focused mainly on one or two technology stacks (e.g. everything to do with developing a java application), with no experience outside of it

Written by Terry Pearson

January 11th, 2008 at 10:15 pm

Posted in Programming

Improve the web with Nofollow Reciprocity.

Creative Commons License
Terry Pearson - The Blog by Terry Pearson
is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Stop SOPA