Administrator

[email protected]

Total likes received: 73 | Pubby Cash: 277


Andy Tang is the creator of Gopubby.com who has a passion for programming and everything related to technology and is skilled in many areas of coding including Python, HTML/CSS, Bootstrap, and SQL. He is experienced with many Python modules including Pygame, Flask, BeautifulSoup, and Kivy. He also has a solid knowledge of Windows, Mac, and Linux/Unix operating systems.

My Articles: 48

What was the name again?

Categories: Tech, Education | Pubby Cash Received:  0

Programming is fun, but it isn't fun when you forget or confuse your variables. It’s annoying to have to remember so many similarly-named variables. “User”, “user”, “users”, all have the same spelling, but their values are different. But how do I know that? Usually, a capital letter at the start of a variable indicates that a variable is an object. Use plural nouns for lists, tuples, and dictionaries because they store multiple values. Singular nouns are used for a single value such as “5” or “Pubby”. Don’t be afraid to make your variable name long because most IDE’s have autofill. Name variables according to the type of data that it will store. For example, you would store “8” in the variable “number”, but you wouldn’t store “8” in “first_names”. Variables names must start with a letter or an underscore, and the remainder of your variable name may consist of letters, numbers, and underscores. Also, avoid using the lowercase letter "l", uppercase, "O" and uppercase ‘I’. Why? Because the "l "and the "I" look a lot like each other and number 1. And "O" looks a lot like "0". Knowing how to skillfully name and use your variables will seem like a life hack, or at least a programming hack! ...  Read more

Don’t You Hate It When a Little Error in Your Code Takes an Entire Day to Fix?

Categories: Tech, Education | Pubby Cash Received:  20

I know, debugging applications can sometimes be an unwelcome activity. You’re busy working under a time crunch and you just want it to work. However, at other times, you might be learning a new language feature or experimenting with a new approach and want to understand more deeply how something is working. Regardless of the situation, debugging code is a necessity, so it’s a good idea to be comfortable working in a debugger. Additionally, I have some more useful tips that can help you better debug your program.

  1. Make sure to test your program frequently. This way, any errors that occur can be easily found as there are only so many places you’ve changed in the code.
  2. When you know where the error is, try many different methods to get it to work. Most bugs are just one tiny little misspelling or logic fallacy. Sometimes, the brutal trial and error can be the best way to get something to work.
  3. Consult help when you need it. Websites like Stack Overflow and Github offer solutions to anything you could encounter. Try Googling the error that shows up in your debugger and you just might find what you’re looking for.
  4. Skillfully use the print statement. It was the first line of code I learned in Python. Place print statements throughout the code and anywhere the print statement doesn’t execute, you know there’s an error.
By knowing how to properly and skillfully debug your program, you could save hours of valuable time and effort.

...  Read more

How to Lure People to Your Website

Categories: Tech, Education | Pubby Cash Received:  20

You just bought a domain and you want more viewers to go on your website. How can you accomplish this most efficiently? You should first consider keeping the layout simple. The simpler your website layout, the better. That doesn’t mean it has to be boring, but it does mean it should focus on the essentials. Clean, functional layouts make your site easier to load, navigate, and use on different platforms and devices. Additionally, enhance your website design with eye-catching colors. Pick a color that will provide the foundation of your entire website design, and then choose a contrasting accent color for important buttons and other interface elements. You can learn more about choosing the right color palette for your brand. It is also important to keep your website mobile-friendly as up to 70% of web traffic comes from a mobile device. That means there’s a good chance that someone visiting your site for the first time is using their smartphone. And if the mobile experience is negative, you’ve just lost a customer. Lastly, make good use of resources as you advertise your website on the many social media sites such as Facebook, Twitter, and Instagram. Make sure you are always available for contact so users can report any possible bugs that may affect the user experience. With all things considered, your website will be like no other! ...  Read more

Magic Mouse vs. Magic Trackpad: Which Is Better?

Categories: Tech | Pubby Cash Received:  0

You just bought a Mac. Next, you bought a Magic Keyboard. Finally, you would need a cursor controller. With the Magic Mouse, you rest your hand on the curved surface and move your arm around to move the pointer up, down, to the left, and the right. The Magic Mouse is more portable. You can lift it with the same hand you navigate with, move it to a different surface, and continue clicking without missing a beat. You can shove it in your back pocket and take it with you on the go. The Magic Trackpad is a little too big to lift with one hand easily, and it doesn't fit in your back pocket. However, with the Magic Trackpad, you move the pointer around by swiping with one finger on the surface. I find it to be more comfortable from an ergonomic standpoint. You don't keep your hand resting in the same place for long periods like you do on a mouse, which is overall better on your hands unless you're specifically using an ergonomic mouse. You don't have to move your whole arm around to move the pointer. With a mouse, the surface of your desk (or a mouse pad) is what you use to move around on the screen. With a trackpad, your finger does the walking. If I were to recommend one over the other, however, I prefer the Magic Trackpad. It features more gestures and the overall design is just better than the Magic Mouse. Check out the amazing Magic Trackpad here! ...  Read more

When Do You Use For Loops and While Loops?

Categories: Tech | Pubby Cash Received:  0

Many programmers don’t really understand why there are two different loops and why they are used in the way they are. Probably the most common type of loop, for loops, are great for when you already know how many times you want to loop through something. When using a for loop, we typically use a counter that will either increment or decrement until a condition is met. Once the condition is met, the loop will stop. A while loop is slightly different than a for loop for the fact that it’s good to use when we don’t know how many times we want to loop through a problem beforehand. This is the key difference between using a for loop or a while loop. Either way, both loops can do the same thing, but for loops are better in situations where you want consistent repetition. This detailed book will extensively cover all of the fundamentals about loops and so much more in Python programming! ...  Read more

1 ... 7 8 9 10

Daily Deals


MECHANICSBURG WEATHER