• Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions
Flyy Tech
  • Home
  • Apple
  • Applications
    • Computers
    • Laptop
    • Microsoft
  • Security
  • Smartphone
  • Gaming
  • Entertainment
    • Literature
    • Cooking
    • Fitness
    • lifestyle
    • Music
    • Nature
    • Podcasts
    • Travel
    • Vlogs
  • Camera
  • Audio
No Result
View All Result
  • Home
  • Apple
  • Applications
    • Computers
    • Laptop
    • Microsoft
  • Security
  • Smartphone
  • Gaming
  • Entertainment
    • Literature
    • Cooking
    • Fitness
    • lifestyle
    • Music
    • Nature
    • Podcasts
    • Travel
    • Vlogs
  • Camera
  • Audio
No Result
View All Result
Flyy Tech
No Result
View All Result

Programming in Rust when your skills are rusty Part 1/3 | by Vicente Aceituno Canal | Aug, 2022

flyytech by flyytech
September 15, 2022
Home Security
Share on FacebookShare on Twitter


It takes a long, long, long, long, long time…!

Photo by jcob nasyr on Unsplash

Last time I compiled a program I wrote was thirty years ago, using TurboC++ on MS-DOS.

This year I decided to start programming in Rust. The project I chose is boringtun, a userspace version of Wireguard written in Rust. Is it possible to recover the lost skills? Let’s find out.

I have been foolish enough to try to do this free-solo, just testing stuff and searching for answers online, here is what I learnt:

  • You can’t start programming with just a compiler. You need a whole development environment and test environment. Setting up your environment may require almost as much learning as programming itself. This is something that you do “only once”, but is a steep hill to climb when you are a newbie, including an older newbie.
  • Many necessary steps setting things are up are omitted in how-to instructions because they are considered way too obvious to mention. For example, before running cargo install boringtun-cli you have to install cargo AND download a local copy of the github repository.
  • Errors you get when making mistakes, that is often, range from useful, like “Command ‘cargo’ not found, but can be installed with: apt install cargo”, to not very informative, to downright misleading. This can be pretty frustrating.
  • When searching for solutions, I now consider best practice to use search filters and look for recent answers first. Things get improved and fixed so fast, incompatibilities appear and disappear, workarounds become unnecessary, and solutions change, so you need to look for recent advice. This does not mean you will necessarily get the advice you need.
  • While you may feel that there should be an easy answer for your problem, it may very well not be the case. With a combination of OS, cloud provider, location, budget, combination of technologies, and intent, it is not actually that rare to get into a rare situation.
  • While you may think that you can repeat easily what you did, it is not true. If you want to save time, write down what you do, and what results you got from doing it. Don’t ever use “muscle memory” when you are as out of technical shape as me. Throwing a copy and pasted command may feel like using some else spell to get what you want. In reality, most of the time the command will only work properly when you know what you are doing. The key here is to be able to reproduce what has been successful in your environment.
  • Understanding what you are doing has always 3 steps: Checking the current status of things, changing the status, checking the new status of things. Sadly most how-to instructions will only explain how to change the status. This leads to additional searches for solutions… I find it particularly annoying when changes in Linux need altogether different commands for checking status and changing status…
  • It doesn’t matter how small you think a problem is. You can easily spend 4 hours trying to change the resolution of a remote desktop virtual monitor, or performing some other apparently minor fix.
  • It is really, really, really hard to know how far along you are. So from the 100 percent of what you want, the last 8 hours represents a progress of 1 percent or 10 percent? When you are as ignorant as I was when I started, there is simply no way to know.
  • When you are new to a subject, and there are many options available you can’t evaluate if the option is right for you … so go down the rabbit hole until you hit a wall and then go back and try another option, like a mouse in lab labyrinth. The problem is that you are blind to your requirements because you assume, mistakenly, that you want is what everyone wants.
  • Example of labyrinth, summarized: I need a remote desktop in a virtual machine on the cloud, as I am going to install the IDE in the virtual machine and access it from everywhere. But, the resolution after I install the remote desktop solution is too small, I try to fix it but it does not work after many tries. But I try a different remote desktop from the one with resolution problems that is more compatible with the cloud provider solving the resolution issue, but it is too slow as it kills the shared CPU. But I can’t install the client in my work computer, so I need a remote desktop via browser option instead. Then I change to a more powerful virtual computer, and try and fail to install Google Chrome Remote Desktop, but the necessary higher spec is too expensive in monthly charges. So I drop everything I have done so far, and I install the IDE in my laptop instead. I still need a remote desktop, installing Google Chrome Remote Desktop just does not work. I comb through online advice and finally I give up when… I find DWService. Marvelous little program that just does the job. This, dear reader, is two weeks on and off of my life. Has it been a waste of time? I am not sure but it can certainly be expensive time wise just to find *what* you should be doing to get what you want, sometimes longer that actually getting it.
  • I wish I could advice you to read error messages carefully, and chase every little one like a hound. But sometimes you try to fix every little error just to realize that what you have been trying to do shouldn’t be done at all, for the purposes that you are seeking. So sometimes it is better to fix every error, and sometimes is better just to give up and find an alternative. You have an idea and later find that is a stupid idea and there is a reason no one is doing that. It happened to me.
  • I know this is hard to imagine for someone who has been in IT recently, but initially I had difficulties telling useful commands from text-to-be-replaced. It is embarrassing to admit but it took me some time to figure out what to do with the text in capitals in this command: cargo build --bin boringtun-cli --release [--target $(TARGET_TRIPLE)]
  • Sometimes, after you solve a problem once, it “magically disappears” and does not come back. It is like there was a sensor in the system detecting your level of knowledge, and throwing an error only when you are not deserving.
  • I wished there was a way, from the syntax, to tell commands that have a temporary effect, an effect for the duration of the session, a permanent effect, and the same or different effect depending on how many times you run the command. This would save millions of hours of learning of something that, in my humble opinion, shouldn’t have to be learnt.

In the next part I will explain my dev and test environments and how they are set up. I have not compiled anything yet with the IDE, hopefully tomorrow.



Source_link

flyytech

flyytech

Next Post
Top Custom Visuals in Power BI

GIFs in Power BI Using Tooltip

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended.

Apple publishes iOS update to fix camera shake in third-party apps: Digital Photography Review

Apple publishes iOS update to fix camera shake in third-party apps: Digital Photography Review

September 27, 2022
Changes to Google Photos app make it easier to set automatic backups

Changes to Google Photos app make it easier to set automatic backups

January 14, 2023

Trending.

Image Creator now live in select countries for Microsoft Bing and coming soon in Microsoft Edge

Image Creator now live in select countries for Microsoft Bing and coming soon in Microsoft Edge

October 23, 2022
Shop now. Pay later. on the App Store

Shop now. Pay later. on the App Store

February 25, 2023
How To Install Tiny11 for Arm64 on Raspberry Pi 4

How To Install Tiny11 for Arm64 on Raspberry Pi 4

February 19, 2023
Thermalright Peerless Assassin 120 SE Review: Incredible, Affordable Air Cooling Performance

Thermalright Peerless Assassin 120 SE Review: Incredible, Affordable Air Cooling Performance

September 27, 2022
Hackers behind MGM cyberattack thrash the casino’s incident response

Hackers behind MGM cyberattack thrash the casino’s incident response

September 16, 2023

Flyy Tech

Welcome to Flyy Tech The goal of Flyy Tech is to give you the absolute best news sources for any topic! Our topics are carefully curated and constantly updated as we know the web moves fast so we try to as well.

Follow Us

Categories

  • Apple
  • Applications
  • Audio
  • Camera
  • Computers
  • Cooking
  • Entertainment
  • Fitness
  • Gaming
  • Laptop
  • lifestyle
  • Literature
  • Microsoft
  • Music
  • Podcasts
  • Review
  • Security
  • Smartphone
  • Travel
  • Uncategorized
  • Vlogs

Site Links

  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions

Recent News

Diablo 3’s season 29 demonstrates everything Diablo 4 gets wrong

Diablo 3’s season 29 demonstrates everything Diablo 4 gets wrong

September 24, 2023
4 steps for purple team success

4 steps for purple team success

September 24, 2023

Copyright © 2022 Flyytech.com | All Rights Reserved.

No Result
View All Result
  • Home
  • Apple
  • Applications
    • Computers
    • Laptop
    • Microsoft
  • Security
  • Smartphone
  • Gaming
  • Entertainment
    • Literature
    • Cooking
    • Fitness
    • lifestyle
    • Music
    • Nature
    • Podcasts
    • Travel
    • Vlogs

Copyright © 2022 Flyytech.com | All Rights Reserved.

What Are Cookies
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT