Tumgik
miquerinus · 1 month
Text
Tumblr media
“Here’s a tip, folks… for complex problems, there are simple solutions.”
12 notes · View notes
miquerinus · 2 months
Text
Tumblr media
For those who aspire to work in the front-end of web applications, Mozilla recently launched a service called Curriculum that helps train this type of professional.
The curriculum provides a structured guide to the essential skills and practices for being a successful front-end developer, along with recommended learning resources.
Training includes knowledge of:
HTML
CSS
JavaScript
1 note · View note
miquerinus · 2 months
Text
Tumblr media
" ... Life is made of choices and challenges, some that make us bald and others that don't… any doubt that the choice is GOLANG ahahahha… just kidding, C++ is the way"
4 notes · View notes
miquerinus · 3 months
Text
Tumblr media
Me thinking CSS caused anger 🙄
3 notes · View notes
miquerinus · 4 months
Text
I know it's late, but I couldn't miss the opportunity for the last meme of 2023 - which is true.
Tumblr media
9 notes · View notes
miquerinus · 6 months
Text
Tumblr media
Bjarne Stroustrup’s Plan for Bringing Safety to C++
At the CppCon C++ conference, the C++ creator identified the specific kinds of safety measures sorely needed in the programming language.
" ... Elsewhere in the talk Stroustrup also points out that “A lot of the so-called ‘safe’ languages outsource all the low-level stuff to C or C++,” temporarily escaping the original language to access hardware resources or even the operating system (which is often written in C) — or even “trusted code” which may actually be very old, tucked away in an external library… or written in an entirely different programming language." - Bjarne Stroustrup.
2 notes · View notes
miquerinus · 6 months
Text
Tumblr media
Give Up C/C++! Microsoft Official Announcement: Please Use Rust to Write Windows Drivers!
Microsoft has released a series of development toolkits on GitHub, allowing developers to use the Rust language to write Windows drivers. link: Give Up C/C++! Microsoft Official Announcement: Please Use Rust to Write Windows Drivers! | by Lucas Scott | Oct, 2023 | Stackademic
40 notes · View notes
miquerinus · 6 months
Text
Tumblr media
This is an example of some C++23 (or maybe C++20) conventions. For you in the community, what does this remind you of, that is, which other language? Python ? Rust ? … perhaps the most accurate answer is both languages ...
0 notes
miquerinus · 6 months
Text
Tumblr media
The time has come when I can say that I am part of the...
42 notes · View notes
miquerinus · 7 months
Text
Tumblr media
Day 5 - 100 days of code with C++
One of the main or fundamental characteristics of any programming language is Functions, but why? Because functions help us maintain order, organization, and also greatly assist in inevitable future maintenance of our code. All the dynamics of programs are carried out through functions.
What are functions ?
But what are functions? Functions are generally small pieces or parts of code that exist outside the main scope of the program, meaning they are code snippets that are called by the function's identifier (name) and also by its return type for that functionality. Therefore, they are responsible for performing a specific task in our program, such as processing a piece of data or a certain number of data that other parts of the program do not handle.
Imagine a program that requests 3 grades to calculate the student's average. Although the program is simple, you can break it down or divide it into parts for future modifications.
Tumblr media
All functions must be specified by a type, meaning the type of data they will return. Return types in C++ basically come down to: integer, float, boolean, and void, with the latter not returning any value.
What Not to Do - Typical Errors
Do not give functions names that are not clear about their functionality. This makes the code harder to read and, consequently, more time-consuming when it comes to maintenance or corrections.
In C++, there is an order that functions must follow to avoid errors during compilation.
Tumblr media
Notice that now the program's organization has changed. 1) Incredibly, this will result in a compilation error. Why? Because the C++ compiler does not find the function mediaFunction() - now you might be thinking, "But why, since mediaFunction() is there in main()?" For the C++ compiler, there is an order.
But how do you solve this problem in C++? There are 2 options: a) You declare the function at the beginning of the code, or b) you place the function before main. However, there is a problem with this last detail. What if another function A calls function B, and function B calls function A?
We would have the same problem again. Therefore, what must be done is to declare a prototype of the function at the beginning.
Tumblr media
Conclusion:
From the little shown here about functions, it is clear that this is a fundamental skill for anyone aspiring to be a good programmer. I tried not to go into too many details because the intention is not to be a course on how to create, but at least to make it a little clear about the fundamental aspect of functions within any code.
17 notes · View notes
miquerinus · 7 months
Text
Why Does C++ Run Faster?
Tumblr media
Java, C#, or Python do not generate native code. Instead, they compile source code into an intermediate code. There are additional tools or programs you can use to translate this intermediate code application into machine code. While these programs convert your code to machine code, they consume various system resources.
C++'s compile and run speeds are very high because there are no overheads like in other languages.
82 notes · View notes
miquerinus · 7 months
Text
Tumblr media
Day 4 - 100 days of code with C++
WHAT TO AVOID IN C++
Direct initialization of variables.
Direct initialization has fallen into disuse in modern C++, why? direct declaration is very similar to function declaration. To avoid problems, as a good practice, it is no longer used.
example:
Tumblr media
Could you tell which of these is a function? If you answered the first one, you got it right. Notice how the two statements are 99% the same. Even though it is a more efficient initialization when compared to copy initialization:
example:
Tumblr media
int num = 2; it as a practice must be given up.
2) Copy Initialization.
Initialization is a less efficient initialization, like direct initialization, copy initialization, is also a form of disuse in modern C++, so practices such as example:
Tumblr media
wrong This type of declaration can cause compilation errors or intermittent errors in the program when it is running.
3) Unused variables.
Another problem that can cause errors in C++ is the failure to use declared or initialized variables. The C++ compiler issues errors if the variable is not being used in the program. What are the options for solving this problem? - Or you use it (an obvious answer) - Or you temporarily omit it through the [[maybe_unused]] attribute
example:
Tumblr media
we are omitting the existence of this variable from the compiler
Tumblr media
4) std::endl or '\n'
Both approaches are functional, however, std::endl is more inefficient than '\n' as a way to do line wrapping. Why ? because it makes the cursor go to the next line of the console and frees the buffer, that is, it does 2 things. Normally you don't need to flush the buffer on each line - std::endl - it's more interesting to let the system itself flush it by itself - it was designed for this, so it's more efficient to use '\n', as it moves to the next console line but, does not make buffer flush request - 1 less thing.
so it's not interesting:
Tumblr media
it's interesting ... :
Tumblr media
Or ...
Tumblr media
Above we used the line break within the message. Outputs with strings by default use " " and not ' '. Therefore, if you are manipulating Strings, it is interesting, in order to make your code more concise, to break the line within the String output.
Conclusion:
From what has been said, it was clear that the c++ language is extremely flexible, a factor that can be positive or negative, as, for beginners, it can seem quite confusing, but, with practice and reading, it becomes not such a big barrier. to be overcome. These aspects can lead to significant performance gains for those who are programming.
5 notes · View notes
miquerinus · 8 months
Text
Tumblr media
Day 3 - 100 days of code with c++
Mathematical Operators.
As expected, C++ is no different from other languages, it has the following operators:
addition (+)
subtraction (-)
multiplication (*)
division (/)
module (%)
These are the basic operations universally used by any language, C++ is no different, but C++ seems to be more flexible.
Tumblr media
As we can see the variable a changes its value 3 times, we highlight the last change in the value of a, when the variable receives itself divided by the value 2.
As with the use of String type variables, we must include the library #include , there are certain operations that to be executed also require the use of a library, in this case for operations of power, root, etc., we need to include a library #include<cmath>
Tumblr media
Increment and decrement operators.
C++ also like other languages, has increment operators ( add +1 to) and decrement operators ( decrease -1 to), so:
x++ is: increments x by +1, then returns the value of x.
although …
++x is: copy x, increment x by +1 and return the copy of x.
Does it look confusing? yes, it seems, but not so much. See below for another example:
Tumblr media
did you understand the logic?
1st example) variable (i) receives the pre increment +1, so i is not zero, now it is 1; In the pre increment it is as if there was an anticipation of the value of i before ending the command.
now
2nd example) variable (i2) does not receive the increment of +1 before the end of the command, that is, (i2) is still 0, we will only see the value +1 when the variable (i2) is executed again.
see below.
Tumblr media
Now it's easier to understand, isn't it?
Simplification of formulas in c++.
Unsurprisingly, c++ has simplified mathematical formulas that inspired many others later, see:
Tumblr media
Conclusion:
As we learn more about the characteristics of the c++ language, it becomes clear how flexible it is, how concise the written code can be and how much it has influenced other more modern languages, however, due to these characteristics it can reserve pitfalls for us, requiring even more for us students, even greater attention to its use.
18 notes · View notes
miquerinus · 8 months
Text
Tumblr media
Day 2 - 100 days of code with C++
Today I'm going to talk a little about variables, what they are and what their role is. or set of hundreds of commands. Each type of variable we create has, in addition to its name, a data type that defines the characteristic of that value in memory, for example:
Tumblr media
Above we are saying that a variable - some value that will occupy a memory space - will be called varInteger and this variable will receive a value of type integer, that is, a value that is not fractioned.
Therefore, it is visible that, after compiling the code, the following message will be printed: The name integer variable is: 10.
Like the integer data type, C++ has other types, such as:
- type float - short precision.
- type double - long precision.
- type char - a character.
- type bool - value true or false.
Now you must be wondering: **" where is the string type ? "** Calm down, I'll talk about her soon...
Therefore, if we want, for example, to print a character on the screen, we would use a variable of type char, such as:
Tumblr media
Therefore it will print on the screen - output - the message **The value of char variable is: D.**
" ok, but where is the string data type? … "
**ok ok, let's talk a little bit about.**
Unlike other data types, in C++ when the programmer wants to work with string input data types, he will have to include a new library in his code.
*#include <string>*
Complicated ? a little bit, but that's ok, see the example below:
example:
Tumblr media
In this image there is a lot - but don't be scared - let's focus only on the #include library that will be called in the body of our code by the std::string command assigned to the variable nameAluno.
Therefore, when we use the string nameAluno, that is, assigning a name, it will be using the resources contained in the library #include <string>.
Conclusion:
It is important to remember that variables do not take that name by chance, if they are values ​​that are allocated in the computer's memory, this means that they are susceptible to undergo some type of change - or not and in some cases, such as constants that their values ​​are immutable.
Variables, due to their mutability ability, are fundamental for the execution of hundreds of thousands of programs, and how they behave in the pc's memory, because knowing how to use them you as a programmer will consequently determine the performance / efficiency of the program. That's why languages ​​like C or C++ are still important languages ​​in didactic use, because everyone who is learning is inevitably forced to learn to use them according to their type and according to their purpose.
25 notes · View notes
miquerinus · 8 months
Text
Tumblr media
Day 1 - 100 days of code C++
Tumblr media
Observations
#include
It means that we are calling a library of the language, that is, we are calling some resource whose purpose is to help in some action that our code is doing, in this case, we are calling this library to print our screen output - hello world - via * std::cout*.
int main()
This is the main function of the language, that is, our program does not exist if there is no main function. The parentheses are used to pass a parameter, in this case we are not passing any.
{}
The keys are the representation of where our code will be executed, therefore it delimits the execution block, even calling other functions or executing something simpler, however being within these delimiters.
std::cout
This is our command responsible for calling the c++ language standard library that works with data input and output - iostream. Without this command we would not be able to print an output on screen.
std::endl
If you stick to STD::, this means that STD is an abbreviation of the word STANDARD, that is, it is an abbreviation that references the C++ Standard library / directive - iostream. Its purpose is to make a line break, that is, when you finish executing the command, the cursor goes to a new line. The letter "\n" does the same thing, I used it because it is a simpler language syntax.
return()
Return(0) means that, if our program does not present any syntax errors, it will not return any errors, thus ending our program properly.
Conclusion
As we observed, C++ is an apparently simple language, it has a concise syntax, for me, for the time being, it did not present major problems, since, as far as I could see, it shares characteristics of other languages ​​that I had the opportunity to have contact with until then. Next day, I want to get into the subject of variables and their types.
47 notes · View notes
miquerinus · 8 months
Text
Tumblr media
I'm back ...and I'm back to say that I want to write 100 days of code in c++ language.
First post will be more for presentation of what is the language itself. Intent is to expose small snippets of code making remarks about.
49 notes · View notes
miquerinus · 9 months
Text
Tumblr media
#java #javaprogramming #language
Yeah, I started to learn JAVA language ... impressions ? well, for those who use a C, at first glance it seems quite complex because of the need to use paradigm of O.O.P ( Object Oriented Programming ).
The verbosity of the language helps you a lot to understand what is happening behind what is happenning.
Tumblr media
I'm thinking of doing 100 days of code in JAVA with very basic programming examples.
1 note · View note