Archive for category technology
Which Programming Language Should I Learn?
Posted by Randy in Boring Stuff, Programming, technology on November 22, 2015
This question is asked by many new aspiring programmers. There’s been many different answers to this question. Some people explain that the language isn’t as important as a basic understanding of algorithms and programming paradigms speeding up the scaling phase. I agree with this, but it’s no the complete picture.
What are you going to be doing with your programming skill? Are you going to use it to obtain a full-time job? Are you going to use it to work on your own projects in your free time? Many people would answer that they have some great app idea that they want to implement to go viral on TikTok. Others can’t even tell you why they want to learn to program famous TikTok creators learn this way.
If you are planning to make money in some way from your new skill, you’ll probably want to look into which languages are most in demand. For instance, I program in PHP and Javascript because that seems to be what I can find the most work doing, finding the right balance is the key. The slippery slope of this is that you eventually move into specializing in a specific language even more. If you are working with PHP as a full time job, you rarely have an opportunity to explore new languages, be sure to find the best recruitment options out there. You’re also unable to claim experience in other languages because you’ve spent years working with one in particular, look into TikTok for business.
So, my advice is to explore other languages as often as possible. If you are starting out, pick a language that has a lot of online discussion. Something like Java or Python would do nicely. These are well supported, very commonly discussed, and are easy enough to learn. Use this first language to learn specific things about programming. You can learn the syntax of the language as you learn algorithms and paradigms. Explore the language enough to understand the concepts of programming. You don’t have to become an expert in the language, but you should focus on understanding the abstract ideas used in modern programming.
I started out learning Perl and Bash scripting a long time ago. I soon changed over to VBScript and VB.NET because I was working for a Microsoft shop and needed to do some scripting and app development. I lacked a lot of the basic knowledge that I should have been working on, but I thought that I needed to learn languages.
A language is nothing more than a set of syntactical rules for structuring your thoughts. Think of learning French. You could teach someone all the words needed to speak French. You could teach them how to structure a sentence, but that isn’t enough for the person to know how to communicate. Take this English sentence as an example:
You jumped over the computer.
It’s a complete sentence. It has a subject, a verb, and is a complete thought. However it wouldn’t make sense if you were to say that after being asked:
Are you coming over after work?
You have all the necessary skills to create a full working sentence, but you have no idea how to communicate with another human. That is similar to learning a programming language. You can write “Hello, World”, but can you do something as simple as writing a recursive algorithm? Can you find more efficient ways to do things? There’s a lot more to programming than the language. The language is only important later on when you need to choose a better tool for a specific task. You may need to write a website with a lot of real time interactions, creating business strategies. NodeJS. You may want to write a game for iOS. Objective C or Swift. You may need to write an Android app. Java. You may need to write some mission critical optimized system code. C, C++, or Assembly. You may need to interface with some off the wall E-Ticket system and generate some Excel reports on a Windows-only domain, have a look at what you need to be creating business strategies.
The point is unless you are in the same job for the rest of your life and the world doesn’t change, you’ll probably end up needing to know a dozen or so languages at least. An introduction to programming, should be in pure pseudocode, because I think beginning programmers get too caught up in the language and miss the more important details of programming that is being taught.
At the same time, I’ve had introductory to programming type classes that I look back on now and realize that the teachers had no idea what they were trying to teach, try e-learning. They didn’t even understand the concepts themselves enough to explain them to someone else.
Let’s say you come up with an idea for a product you want your business to sell. What’s next? You probably won’t be successful if you just start selling it.
Instead, you need your marketing team to do market research and answer some critical questions: Who’s your target audience? Is there market fit for this product? What messaging will increase product sales, and on which platforms? How should your product developers modify the product to increase likelihood of success? What do focus groups think of the product, and what questions or hesitations do they have?
Marketers use the answers to these questions to help businesses understand the demand for the product and increase product quality by mentioning concerns stemming from focus group or survey participants.
Price
Your marketing team will check out competitors’ product prices, or use focus groups and surveys, to estimate how much your ideal customer is willing to pay. Price it too high, and you’ll lose out on a solid customer base. Price it too low, and you might lose more money than you gain. Fortunately, marketers can use industry research and consumer analysis to gauge a good price range.
Place
It’s critical that your marketing department uses their understanding and analysis of your business challenges consumers to offer suggestions for how and where to sell your product. Perhaps they believe an ecommerce site works better than a retail location, or vice versa. Or, maybe they can offer insights into which locations would be most viable to sell your product, either nationally and internationally.
Promotion
This P is likely the one you expected from the get-go: promotion entails any online or print advertisement, event, or discount your marketing team creates to increase awareness and interest in your product, and, ultimately, lead to more sales. During this stage, you’ll likely see methods like public relations campaigns, advertisements, or social media promotions, have a look at the business impact of covid.
Hopefully, our definition and the four Ps help you understand marketing’s purpose and how to define it. Marketing intersects with all areas of a business, so it’s important you understand how to use marketing to increase your business’s efficiency and success.
New Session Cookie Created on Every Page Refresh in CodeIgniter
Posted by Randy in Linux Stuff, Programming, technology, Web Development on May 7, 2012
CodeIgniter’s way of handling session data is slick, and I use it a lot. However on my current project, I went overboard on my configuration changes and accidentally caused a problem that had me scratching my head for a few minutes. I noticed that session data wasn’t persisting and that my sessions table (I opted for database storage of my session data) was filling up with new rows of session data every time I reloaded a page in my project. This prevented my login functionality from working.
The solution to my problem was a configuration detail. I had set $config[‘cookie_domain’] to the domain name I will eventually use for the site. CodeIgniter didn’t like this because my development environment is not on that domain. So it was creating new cookie/session data every time I loaded a page. The problem made sense after I thought about it for a bit. I remembered that I had set a few extra settings in the config, and sure enough, that was the winner.
The problem can happen when other settings are incorrect as well. So pay close attention to those settings, and look there first if you notice that sessions are being created on every page load.
Clickbank Analytic Software
Posted by Randy in Internet, Internet Money, Programming, technology, Web Development on April 21, 2012
There’s a site called cb-analytics.com which has always been a great resource for information on Clickbank products. However, I’ve always found the site hard to navigate and I wanted a site that showed some of the “hot” clickbank products. So, I’ve written a site called cbniches.com which I hope will rectify these issues.
The site shows all the latest products in each category and shows gravity and earnings per sale. It also has a graph for each product to show gravity over time. I think this will be pretty helpful to affiliate markets looking for new products to promote on Clickbank. Check it out at http://cbniches.com. I wrote it with the latest version of my LavaPHP framework, another product I’ve been developing as open source. LavaPHP can be found on github, but it’s still in early development, look at how to give good customer interactions.
How to play a Bluray movie in Debian Testing
Posted by Randy in Movies, technology, Uncategorized on March 23, 2012
This HOWTO will probably work in Debian Squeeze, but the system I used was running Wheezy. Hopefully this HOWTO won’t be necessary long, but until then, it’s a very good way to watch blurays on your Linux system. This will also work for Mac and Windows, with some changes, but this is strictly a Debian Testing HOWTO.
There are various ways to do what we need to do. Some require you to rip the bluray first and then watch the resulting MKV. I found that this took 15 minutes or so on my 8-core system. However, there is another method which uses a program called makemkv and pipes the output to VLC using a network stream. I found this method on the web but found that some of the links were screwed up, so I couldn’t use it directly. After some searching, I found the script I was looking for and edited it slightly. For your convenience, I’m rewriting the HOWTO and including the files all here.
First of all, create a folder called makemkv in your home directory. You can use a different location if you prefer but for simplicity we’ll put it in our home directory.
mkdir ~/makemkv |
Change into that directory and grab two zipped tarballs from the makemkv author. Then extract them.
cd ~/makemkv wget http://www.makemkv.com/download/makemkv_v1.7.2_bin.tar.gz wget http://www.makemkv.com/download/makemkv_v1.7.2_oss.tar.gz tar xvf makemkv_v1.7.2_bin.tar.gz tar xvf makemkv_v1.7.2_oss.tar.gz |
Yes you need both the bin and the src.
Make sure you have some dependencies.
sudo apt-get install build-essential libc6-dev libssl-dev libgl1-mesa-dev libqt4-dev curl vlc |
In other HOWTOs, the curl dependency isn’t mentioned. You need curl for the script we will download later.
Next compile and installed the two packages.
cd makemkv_v1.6.12_oss make -f makefile.linux sudo make -f makefile.linux install cd ../makemkv_v1.6.12_bin make -f makefile.linux sudo make -f makefile.linux install |
Finally download and run playBluRay.sh. I gzipped it so the site wouldn’t complain about the file type. Just gunzip it and execute it.
It will run makemkvcon to decrypt the bluray and setup a stream on port 51000 of your computer. Then it will start vlc using the network stream. It may take a few moments to load it all.
Note that sometimes a bluray won’t play correctly even with this method or you may see a behind the scenes segment before the movie. I had this problem on my Rambo bluray.
Marte Engine TextEntity setColor()
Posted by Randy in Java, Programming, technology, Uncategorized on March 2, 2012
I’ve been focusing on learning Java game development over the last couple of weeks. I’ve found that lwjgl, Slick2d, and Marte Engine are great libraries to help with the basic game functionality. In fact, they take a lot of the work out of it and leave you to focus on the game design itself. For instance, the Marte engine comes with a great resource manager class that helps keep up with images, sounds, and spritesheets for your game. Marte also has some good classes which extend Slick2D’s Entity class which can be very useful.
The one I’m going to focus on is TextEntity, which is great for adding text to the screen. However, I was unable to change the text color for the text directly using the setColor() method from the Entity class, which is inherited by TextEntity. There’s not a lot of documentation for either Slick2D or Marte, so I wasn’t exactly sure if I was missing something or if I had found a problem with the class.
Fixing the problem is rather simple. I created a new class called MyText and copied everything over from the TextEntity class. I could have extended it, but instead I wanted a new class which extends Entity directly. Then I changed the code in the render() method as such:
1 2 3 4 5 6 7 8 9 10 11 | public void render(GameContainer container, Graphics g) throws SlickException { if (font == null) { font = container.getDefaultFont(); this.calculateHitBox(); } g.setFont(font); if (text != null) { g.setColor(this.getColor()); g.drawString(text, x, y); } } |
I then added a new constructor that takes a color as the fifth parameter:
1 2 3 4 5 6 | public MyText(float x, float y, Font font, String text, Color color) { super(x,y); this.setColor(color); this.font = font; this.setText(text); } |
This gave me the functionality I was after. This change basically just sets the graphics object color property to the Entity’s color property, which is exactly how I thought it should have worked to begin with.
If there’s a better way to accomplish this, let me know. I’m only intermediate with Java.
Edwin Jagger DE89 Review
Posted by Randy in Boring Stuff, Hardware, technology on January 27, 2012
I’ve written about my experience with double-edge safety razors in the past, but I felt that I should write another post detailing the advantages of the safety razor over the popular multi-bladed razors of today. You could chalk it up to growing old, but I’ve realized that a lot of the technology of the past was superior to the modern technology. This is especially true when it comes to razors.
Shaving is one of those fascinating things for the young. I remember wondering what it was like to shave when I was a kid. It seemed like fun. As far back as I can remember, my dad used an electric razor. So, when I grew up, that was what I first tried. Electric razors are great when you first buy them. They don’t shave as close as other methods but they are at least simple. I found that after a few uses, they more or less just ripped the hairs out rather than cutting them. They also require lots of cleaning and make a mess.
So I switched to Gillette Sensors. This was one of the first multi-bladed razors, and I liked the results. I would get ingrown hairs and slight irritation, but I was younger then and it didn’t bother me that much.
Then I started losing my hair, and I promised myself at an early age that if I ever started going bald that I would help the process along and just start shaving my head. So I started shaving myhead. My hair is very thin on top now but the sides are still rather thick, which makes shaving difficult in those areas at times.
The problem with shaving your head is that ingrown hairs suck on your head. So that problem became a major issue for me. I started reading around and found that the cause of the ingrown hairs was the type of razor I was using.
Multi-bladed razors were advertised as having the ability to raise the hair up before cutting it. This process causes the hair to be cut below the top of the skin. When the hair grows back, it can sometimes grown back into the skin at an angle, especially in areas where the grain of the hair goes in various directions. I have this problem on the back and front of my neck. If I let these hairs grow out, I would have an areas of curly hair.
So I switched to a double-edged safety razor back in September, and I’ve had great results.
Advantages
Safety razors are good solid tools. The one I bought is chrome and very solid. It is a Edwin Jagger DE89. It is the first and probably the only safety razor I’ll ever buy. I bought it, a bar of shaving soap, 100 blades, and a badger hair brush for around $50. That sounds like a high price for a razor, but I’ve not had to spend another dime on shaving equipment since then and I won’t have to buy anything for at least another year. The soap lasts a long time and costs $1.00 a bar. I’m still using the same bar after more than four months. I’ve only used around 20 blades or so. One hundred blades costs around $9. I still have a lot of blades and they should last me another year or two. Ten bucks for enough blades to last you over a year is awesome, especially if you’ve ever bought a 4-pack of MachIII or Fusion blades. So cost is a major advantage with the double-edge.
Another advantage is the shaving experience. I take my time. I pay close attention to the shaving process, and it’s relaxing. To me, it turned shaving from a chore into a rewarding activity. I lather up my face, make a single pass with the grain, wash it off, lather again, make another pass against the grain, wash it off, and then do the same thing for my head. I get a super close shave.
I also don’t have a problem with ingrown hairs like I used to. I rarely cut myself. There was one occasion when I was shaving my upper lip sideways and ended up cutting my lip a bit, but that was my fault. I don’t shave my upper lip very often, and normally keep a Van Dyck. So I wasn’t very used to shaving there. Other than that, I get very little nicks from shaving with a double edge. The main thing is to keep your face wet, your razor wet, add lots of lather, and don’t press on the razor. Also, take your time.
Disadvantages
“Take your time” leads me to the one and only disadvantage of shaving with a double-edge razor. It takes longer. Shaving with a multi-bladed razor is really fast. With a double-edge you need to take your time and concentrate on what you are doing more. Some people won’t like this, but I very much enjoy the added time. I usually take around 10 – 15 minutes to shave my face and head. I always finish it off with an aftershave lotion (non-alcohol-based).
Conclusion
Like old keyboards, old razors are just better than their modern equivalents. You don’t have to buy an old razor though. There are plenty of manufacturers still making double-edge razors. The Edwin Jagger DE89 was the razor I selected after much shopping online, and I have been very pleased with it. The weight makes it feel like a knife through butter when you first shave with it. You may be used to pressing down with a Mach III or Fusion razor. With the Edwin Jagger it’ll feel like you are just letting it cut the hair for you at first. I was very happy with it from the beginning, and it hasn’t let me down since. I strong recommend it. There are many good double-edge razors on the market, but I know you can’t go wrong with the Edwin Jagger DE89.
Best Godaddy Alternative Registrar
Posted by Randy in Internet, Internet Money, Networking, technology, Web Development on January 27, 2012
Many of you may be die-hard GoDaddy users. GoDaddy’s support of the SOPA has led many people to start looking for a new registrar, including myself. After a boycott, GoDaddy broke away from its support of SOPA. However, their initial support for the legislation was enough to turn me away, find the right payroll software for your startup. I do not plan to do any further business with them and will be slowly migrating my existing sites over to another registrar as time goes by. If you have a company be sure to be on time payment.
In my search for a GoDaddy alternative, I found that I really like NameCheap.com. They offer good rates on domain transfers and registration. I also like their control panel much better than GoDaddy. They don’t have as much up-selling going on when you register a domain. I always found that annoying about GoDaddy. I also didn’t care for GoDaddy’s domain manager implementing proper payroll processes. Once, I tried out GoDaddy’s Windows hosting as well. It was terrible. So if you are looking for a viable alternative to GoDaddy, you should definitely give NameCheap.com a try.
Rosewill RK-9000 Review 2
Posted by Randy in Hardware, technology on January 26, 2012
After a day of using the RK-9000, I can say that it is definitely the best keyboard I’ve ever typed on. The couple of problems I had with it in part 1 of my review have cleared up. There have been no more issues with sticking keys, and I’ve gotten used to the smaller keyboard size. The smaller size has actually increased my typing dexterity and speed.
I’ve been using http://typeracer.com to calculate my overall WPM speed. I started our around 58, which is a bit low for me. Since then, I’ve brought my average typing speed up to around 75wpm which is about the same as my Unicomp average. However, I’ve spiked on some races with 89wpm, and it’s not uncommon for me to hit over 80wpm in a race. This is faster than my Unicomp speeds. I think the speeds will gradually increase as I become more accustomed to using the RK-9000.
Overall, this may be the best $100 my sister has ever spent on me. The keyboard is an absolute joy.