Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/23/d577870663/htdocs/techcogs/wp-content/plugins/jetpack/_inc/lib/class.media-summary.php on line 77

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/23/d577870663/htdocs/techcogs/wp-content/plugins/jetpack/_inc/lib/class.media-summary.php on line 87
Tech Cogs – Computers and Technology

Ubuntu 17.04 Uses Swap File Instead of Partition

Traditionally, when you install Linux, one or more partitions are created for data, and another partition is created for the swap. This is generally more secure because programs can’t directly access the data that’s kept in the swap partition.

Starting with Ubuntu 17.04, fresh installs will use a swap file instead of a swap partition by default. While this technically might not be as secure as using a swap partition, swap files aren’t really a security concern, and it will also make a number of things easier.

Using a swap file will make partitioning much easier as no swap partition needs to be created, and it will also allow the swap to grow as necessary. Swap partitions are created with a fixed size and always remain at that size, while swap files can grow as needed.

Overall, I think this is a good path for Ubuntu to take. Often, keeping things simple is a better answer.

The Path to a Python Twitter Bot

It turns out when you’re trying to write an application that interfaces with the Twitter APIs you need a variety of keys and things from Twitter. In order to get those you have to provide Twitter with a valid phone number which can receive SMS messages for verification purposes. Despite the ubiquity of cell phones, still not everyone has one, or wants to give out their number, so I’m not sure what Twitter does in that instance. Either way, this is something important to keep in mind when trying to write a Twitter program.

Dock that Nintendo Switch

As an interesting but not surprising bit of information, it turns out the Nintendo Switch is more powerful when it’s docked. When the Nintendo Switch is docked the processor runs faster, providing the most power for games. I expect this is the mode in which most people will be playing the video game console.

Some people will certainly find the portable option of the Nintedo Switch attractive so it’ll be interesting to see how the difference in processor speed will effect games when the unit is docked and when it’s being used as a handheld game system. Either way it’s clear that Nintendo is continuing to try to use innovative ideas for their next game console while perhaps lending more of a nod to traditional gaming.

When Trying to Rank on YouTube

When trying to rank on YouTube, there are a few things you should remember. It seems right now especially as YouTube’s algorithms are fine-tuned to work more carefully with the data that’s always been the most important to YouTube some people seem confused about what actually helps new people find your videos and your channel.

First, watch time is key. The higher your watch time, the more watch time you have, the higher YouTube will rank your videos. While community interactions are great, comments and likes aren’t nearly as important to YouTube as watch time. Community interactions can be gamed fairly easily by those that want to go to the trouble, but watch time is a more direct identifier of how interested people are in a particular video.

The best sort of community interaction is sharing a video. That will increase both the number of views and the amount of watch time, which will help it rank higher.

Second is metadata. The title, description, and tags. The YouTube algorithm is essentially a search engine powered by Google, its parent company. It uses metadata for its search results and as a way to more accurately group videos for video recommendations and things like that. Make sure your titles, descriptions, and tags are clear and accurate.

And third, as everyone already knows, community interaction in the form of you interacting with the community is very important for people to find out about your channel and for feeling welcomed.

Aside from making great content, these are the things people should be paying the most attention to when trying to rank their videos on YouTube.

Give Me Some Sweet GUI Love

When it comes to writing programs and applications even though these days the emphasis is on network things, Internet things, and servers, I still enjoy writing traditional applications too, so in order for me to really connect with a programming language it needs to have easy support of GUI development.

This is one of the reasons I keep coming back to Java for various projects, with its built-in GUI toolkit, and one of the things I like about Python, where it’s easy to put together a GUI using Tkinter or something like WxWidgets.

In order for me to be interested in a programming language, it needs to have good GUI support.

Lists are Slow in Vala

The other day I wrote a small program in Python. Part of the program involved reading a text file, parsing the information, then appending the information line-by-line to two lists inside a loop. It worked well and it worked pretty quickly but I decided I wanted to try rewriting the program in Vala, which is a programming language somewhat similar to Java and should be fairly familiar to Java developers. Vala cross-compiles its code into C before compiling the C code so I thought recreating the program in Vala would make it even faster.

All of the normal elements of the program, reading the file, parsing it, did work fairly quickly. But appending the data to the lists was incredibly slow. Whereas the Python program was able to do it almost instantly, the Vala program took a good 15 or 20 seconds to do the same thing. I tried a number of different things to make sure it was appending the data to the lists that was causing the program to be slow, and that is indeed what it was.

The only reason I can think of for this is because Vala converts the program into C and dynamic lists aren’t something C natively supports, Vala must have to do some sort of gymnastics to get the Vala lists to work in the translated C code.

Whatever the reason, I’ll just be sticking to Python for my projects.

Copyright ©2020 Magic Kazoo Media