p2mc
p2mc
P2MC
23 posts
Mostly about Programming
Don't wanna be here? Send us removal request.
p2mc · 2 years ago
Text
Introduction and Usage of Auto in C++11
Hello! Today, I'd like to talk about 'auto,' one of the features in C++11 that I started using early on. As the C++ standard continues to be updated, many new features are being added, and among them, auto is a useful feature that can greatly improve code readability and productivity.
Concept of Auto
Auto is a feature introduced in C++11 that automatically infers the type when declaring a variable. For example, when you have a variable int i = 0;, if you declare auto j = i;, the compiler will automatically infer the type of j as int. This feature takes into account the characteristics of C++, where the type does not change once determined, unlike dynamic type languages like JavaScript.
Advantages of Auto
Code maintenance becomes more convenient. If you want to change the type of i, you would need to find and change all assigned code if you didn't use auto. However, with auto, there's no need to do that.
When using iterators in vectors or STL containers, the amount of complex typing can be reduced. For example, ::iterator:: is already 20~30 characters long, but using auto instead simplifies the code.
Disadvantages of Auto
It can be difficult for someone new to the code to immediately identify the type of the variable. However, using an IDE like Visual Studio allows you to check type information by just hovering your mouse cursor, so it's not a big issue.
Considerations When Using Auto
When first using auto, there may be some confusing aspects, as auto can be assigned in three different ways:
Assigning a variable directly: When you have int i;, by assigning auto a = i;, a will be of type int.
Assigning a pointer variable: When you have int* i;, by assigning auto a = i;, a will be of type int*.
Assigning a reference variable: When a function returns int&, you should assign it as auto& a = function();.
This format is necessary for proper reference handling. At first, you might think that writing auto a = function(); would be sufficient, but in this case, a copy is created, so to maintain the reference, you should use auto&.
Conclusion
Auto is a very useful feature introduced in C++11. It can enhance code readability and productivity and make maintenance more convenient through variable type inference. While there are disadvantages and precautions, understanding and appropriately using these aspects can greatly improve programming efficiency.
We have introduced the auto feature of C++11 and looked at its advantages, disadvantages, and precautions. In the future, we'd like to explore the world of programming more deeply by introducing various C++ features together. Thank you!
0 notes
p2mc · 2 years ago
Text
Can You Become a Programmer If You're Bad at Math?
Many people want to become game developers or programmers, but often worry, "Can I become a programmer even if I'm bad at math?" The answer to this question can be summarized as follows:
Math and programming are closely related to logical thinking. If you're weak in math, there's a high probability that your logical thinking is also weak. In this case, it would be difficult to become an excellent programmer.
However, when claiming to be bad at math, it's important to distinguish whether it's due to a lack of memorization skills or a lack of logical thinking. If it's a matter of memorization, you can still become a programmer.
When studying math, it's better to focus on memorizing only the most essential formulas and deriving the necessary formulas from them, rather than trying to memorize everything. This way, even if you don't have strong memorization skills, you can still excel in math. To become a game programmer, it's beneficial to improve both your math and logical thinking skills.
If you think your logical thinking is insufficient, enjoying programming as a hobby might be a good choice. However, to grow as a professional programmer, you need to develop your logical thinking skills.
In conclusion, even if you're bad at math, you can still become a game programmer, but you need to improve your logical thinking skills. If you have weak memorization skills, you can start programming without major concerns. To enhance your programming capabilities, continuously develop your math and logical thinking skills.
0 notes
p2mc · 2 years ago
Text
The Anatomy of a Bank Run: Understanding the Financial Phenomenon
Introduction
A bank run is a fascinating yet potentially devastating financial event that occurs when a large number of customers withdraw their deposits simultaneously, fearing that the bank may become insolvent. Despite the historical relevance of bank runs, many people are not fully aware of how they work or the potential consequences they may bring. In this blog post, we will explore the mechanics behind a bank run, what triggers them, and how they can impact the financial sector and the overall economy.
What is a Bank Run?
A bank run is a situation where a significant number of customers rush to withdraw their money from a bank, fearing that the institution might not be able to meet their financial obligations. Banks typically operate on a fractional reserve system, meaning they only keep a small portion of their total deposits as cash on hand, while the majority is lent out or invested to generate profits. This system works smoothly under normal circumstances, as customers don't usually withdraw their funds all at once. However, when panic sets in and large withdrawals occur, banks may struggle to provide the necessary funds, leading to a crisis.
Triggers of a Bank Run
Bank runs can be triggered by several factors:
Rumors and Speculation: Unfounded rumors or negative news about a bank's financial health can cause panic among customers, leading them to withdraw their funds.
Economic Crisis: A general economic downturn or a financial crisis may create a sense of insecurity and increase the risk of bank runs.
Lack of Confidence: Customers may lose confidence in the bank's management, prompting them to withdraw their funds.
Contagion Effect: Bank runs at one institution can quickly spread to others, particularly if they are perceived to be facing similar problems.
Consequences of a Bank Run
Bank runs can have severe consequences for both the financial institution and the broader economy:
Insolvency: If a bank cannot meet the withdrawal demands, it may become insolvent, leading to the collapse of the institution.
Loss of Savings: Customers who are unable to withdraw their funds before a bank's collapse may lose some or all of their savings.
Credit Crunch: As banks struggle to meet withdrawal demands, they may cut back on lending, leading to a credit crunch, which can hamper economic growth.
Contagion: A bank run may trigger a domino effect, causing other banks to experience similar situations, potentially leading to a widespread financial crisis.
Preventing Bank Runs
To mitigate the risk of bank runs, regulators and governments have introduced several measures:
Deposit Insurance: Government-backed deposit insurance schemes provide a safety net for depositors, ensuring that their funds are protected up to a certain limit in case of a bank's insolvency.
Capital Requirements: Regulators enforce minimum capital requirements for banks, ensuring that they have sufficient financial reserves to withstand economic shocks and maintain customer confidence.
Transparency: Banks are required to publish periodic financial statements, providing transparency and allowing customers and investors to make informed decisions.
Emergency Lending: Central banks can act as a lender of last resort, providing liquidity to financial institutions during a crisis to prevent widespread panic.
Conclusion
Bank runs are a financial phenomenon that, while rare, can have devastating consequences for both individual depositors and the broader economy. Understanding the mechanics behind a bank run, its triggers, and the preventive measures in place is crucial for navigating the complex world of finance. By staying informed and trusting the safeguards put in place by regulators and governments, customers can minimize their exposure to the risks associated with bank runs.
0 notes
p2mc · 2 years ago
Text
Better with Less Regex
Today, I want to talk about Regex, or regular expressions in English. Regex is a tool that checks if a string matches a given pattern. For example, if a string starts with a number, followed by six alphabetic characters, and then a few spaces, you can use Regex to check if it matches that pattern.
At first glance, Regex seems simple and powerful. With just one line of code, you can check if a string matches a given pattern. However, in practice, Regex can be difficult to use and understand, especially for complex patterns.
I personally don't like using Regex and try to avoid it whenever possible. While it's useful for complex patterns, for simple tasks like checking if a string starts with two characters and ends with three numbers, I think it's better to use if/else statements and substring operations. The reason is that Regex can be difficult to read and understand, even for experienced programmers.
Regex is like searching for files in a directory using the command line. While it's possible to use the command line to search for files, most people prefer to use the graphical file explorer. Similarly, while Regex can be powerful, it can make code difficult to read and maintain. In my opinion, code that is easy to read and understand is more important than code that is concise.
That said, there are some cases where Regex is useful. For example, in ASP.NET routing, you may need to validate that a parameter is an integer with a minimum value. In such cases, Regex can be helpful for checking the format of a token. However, I believe that Regex should be used sparingly, and only when necessary.
If you must use Regex, it's important to document your code thoroughly. While you may be able to understand your Regex pattern, others may not. It's also important to be careful during code reviews, as Regex patterns can be easy to get wrong.
In conclusion, while Regex can be a powerful tool, it's not a magic solution to all problems. It's important to use it judiciously and not rely on it too heavily. Ultimately, code that is easy to read and maintain is more important than code that is concise. So, if you can avoid using Regex, I would recommend doing so. However, if you must use it, be sure to document your code thoroughly and use it with care.
It's also important to remember that Regex is just a tool, and like any tool, it has its strengths and weaknesses. It's not a silver bullet that can solve every problem. Rather, it's a state machine that can match patterns in a given string. Understanding its limitations and using it wisely can make your code more effective and maintainable.
So, let's use Regex carefully and only when necessary. It's a powerful tool, but it's not a magic solution.
0 notes
p2mc · 2 years ago
Text
Can't Fix a Thing? You Are Still a Junior Programmer
Typically, one of the conditions for becoming an intermediate is being able to fix any bug that arises in your code, product, or library usage. In this blog post, I will provide some simple judgment criteria for determining whether you are a junior or an intermediate.
Since we are talking about juniors, let's assume that you are currently working in a company, regardless of whether you have been in the industry for 6 months, 1 year, 10 years, or 20 years. Here's a simple question: "Can I fix any bug that occurs in the product, including the code I am writing, the product I am creating, and the libraries I am using?" If the answer is yes, then you are an intermediate. If there is even one bug that you cannot fix, then you are a junior. It's that simple.
Of course, the criteria for distinguishing between juniors, intermediates, and seniors can vary from person to person, but the standard that is generally used in good companies in the industry is this: If you are an intermediate, you should be able to fix any bug that arises in the product. If you can't fix it, it means you're not there yet. It's that simple.
"But what if there are other issues with the libraries? How do I fix that?" If the library is mostly open source, you can look at the source code. If not, you can try various data inputs to find the problem, and then block the part where the data is entered. On the other hand, if you don't have the code and are using a managed language, you can decompile it and find all the bugs. You have to find them. However, I can say this much: regardless of the problem, an intermediate should be able to find a way to fix it. You may not know how to fix it right away, but you can find a way to fix it. "Is the way to fix it correct? Does it make it more maintainable? Is it efficient?" These are not in the intermediate domain, but in the senior domain. Intermediates can fix any problem.
If you're wondering about the analogy for juniors, let's say you call an interior designer. There are different levels of interior designers, right? Some interior designers have clean finishes and do their job well. Even if you just say "A," they understand what you mean and create something better than you imagined, making something clean, beautiful, and functional. They are like seniors. On the other hand, some interior designers do the job, but the finish is a bit sloppy, and there are some problems, so you have to call the designer again. They fix it, but it looks like a patchwork job. They still make the function work, but there are some problems, and you're not sure what they are. These designers are intermediates. Then you call another designer, ask them to do A, and they do C. "Hey, this isn't A, it's C!" "I don't know how to do A." "Then why are you getting paid here?" This is a junior. This is the difference.
If an intermediate can't do something, does that mean they're not an intermediate? No. Of course, we're not talking about fixing bugs, but building a system. For example, if you suddenly have to make a KakaoTalk application and process hundreds of thousands of concurrent connections, the system design that follows is very complex. If you don't have enough experience and haven't tried this
and experimented with different approaches, you may not be able to make the right choices. This can affect your ability to implement something new. However, an intermediate should still be able to find and fix any bug in an existing structure. That's what you should be able to do.
Now, let's talk about implementation for a moment. If you are implementing a desktop program, there is nothing that an intermediate cannot do. Even if you don't know something right away, you can research and find a way to make it work, even if it's inefficient or patched together. If you can't do that, then you are a junior. However, the judgment criteria for this may be ambiguous. What I want to emphasize in this blog post is that if there is even one bug you cannot fix, then you are a junior. It's that simple.
In conclusion, the ability to fix any bug that arises in your code, product, or library usage is a critical criterion for distinguishing between juniors and intermediates. Regardless of the problem, an intermediate should be able to find a way to fix it, even if they may not know the most efficient way or the way to make it more maintainable. If you can't do that, then you are a junior. Keep in mind that these criteria may vary from person to person, but the standard used in good companies in the industry is generally consistent with this.
0 notes
p2mc · 2 years ago
Text
Use Static Assert Alot!
One of the features that I use in C++11 is called static_assert. You may have used assert before, which is a debugging tool that checks whether certain conditions are met during runtime. As someone who develops games, we don't always prioritize exception handling due to performance concerns. Therefore, we often rely heavily on assert to catch errors during development. However, the downside of assert is that it can only be checked during runtime.
Fortunately, there are also a lot of asserts that can be checked during compilation. For example, if we create a structure of 5 bytes and we want to ensure that it stays that size, we can use static_assert to check the size during compilation. If the size changes, it will result in a compilation error. Using static_assert is actually quite simple. Instead of using assert, we just use static_assert. If the condition cannot be checked during compilation, an error will occur, but if everything is fine, it will compile without any issues.
One of the reasons why I love using static_assert is because it can catch errors before the code is even executed. With assert, we have to wait until the code is executed to check whether the condition is met. However, with static_assert, it is checked during compilation, which saves a lot of time and effort in catching errors early on. Before C++11, we had to resort to various workarounds to mimic static_assert, but now that it's available, there's no reason not to use it.
In my experience, good programmers use both assert and static_assert extensively. It's because debugging is much faster this way. Therefore, if you haven't used static_assert before, I highly recommend that you give it a try. It can help you catch errors early on and save you a lot of time and effort in the long run.
0 notes
p2mc · 2 years ago
Text
I Suck at Math. Can I Become a Programmer?
Many people who want to become game developers or programmers often ask the question, "Can I become a programmer if I'm bad at math?" Well, the short answer is no, if you can't do math, then you can't be a programmer. However, I think many aspiring programmers have a misconception about what math really is.
When some people hear the word "math," they think of memorizing complex formulas and plugging in numbers to get the answer. But that's not really what math is all about. In many ways, math is similar to logic. It involves taking certain assumptions and parameters and logically deducing the results. Therefore, if you don't have a good grasp of logic, you can't be a good programmer.
If you're asking me, "Can I program if I can't do math?" then the answer is yes, you can program. But if you're asking me, "Can I be a good programmer if I'm not good at logic?" then the answer is no. You might be able to program as a hobby, but you won't be able to create anything substantial without a good grasp of logic.
If your problem is that you have a poor memory, then there are ways to work around it. When studying math, you shouldn't try to memorize every formula. Instead, focus on the most essential formulas and try to understand how they are derived. Math is not just about memorization, but also about understanding the logic behind it.
I myself have never been good at math. In middle school, I would get an average of 50-60 points in math. I found trigonometry particularly difficult because of the way it was taught to me. But when I got to high school, I decided to work on my math skills and attended a math academy. There, I learned that math was not just about memorization, but also about understanding.
For example, if you're asked, "What is cosine in a triangle?" you might not know the answer. But if you know that cosine is the ratio of the adjacent side to the hypotenuse, then you can derive the formula for cosine in a triangle. In this way, you can focus on understanding the most essential concepts and work from there.
If you're struggling with math, I encourage you to keep working on it. Practice makes perfect, and the more you practice, the better you'll get. And even if you're not great at math, that doesn't mean you can't be a programmer. As long as you have a good grasp of logic, you can still create great programs.
0 notes
p2mc · 2 years ago
Text
What Is Shader Compilation
Shaders are small programs used in graphics programming to implement various graphics features such as rendering, lighting, and shadows for 3D models. Shaders are mainly executed on the GPU of a graphics card, demonstrating high performance.
Shader code is usually written in HLSL for Windows environments, and in a proprietary language provided by console manufacturers for console game environments, while GLSL, Cg, and other languages are also used. They are very similar to C code, and the role of shader compilation is to convert this code into executable code that can be executed on a graphics card. Shader compilation is performed in two ways.
The first method is to statically compile it beforehand. In this case, the shader code is pre-compiled into executable code. This method is faster and more stable than the dynamic runtime compilation method, which we will see next. Also, statically compiled shader code can be used immediately during application runtime, making it advantageous for performance. This is the method that the industry usually prefers.
The second method is to dynamically compile it at runtime. In this case, the shader code is loaded during program execution and converted into executable code that can be executed on the graphics card. This method is useful when you need to change or rewrite shader code during development.
Shader compilation greatly affects the performance and stability of shader code. Therefore, it is important to write optimized shader code and choose appropriate compilation options when performing shader compilation. Additionally, using static compilation can optimize and improve the performance of shader code.
When using static compilation, the shader code is pre-compiled into executable code, so there is no cost of compiling shader code during application runtime, preventing the application runtime from slowing down. Also, there is the advantage of being able to check for errors in shader code in advance. Statically compiled shader code guarantees higher stability during application runtime.
There are several ways to perform static compilation. For example, in DirectX, the D3DCompile function is used to compile shader code, while in OpenGL, functions such as glShaderSource, glCompileShader, and glGetShaderiv are used to compile shader code.
Static compilation is one of the important methods to pre-optimize and improve the performance of shader code. Therefore, graphics programmers can write optimized shader code by selecting appropriate compiler options and use static compilation methods to improve performance.
In conclusion, shader compilation plays an important role in graphics programming. Selecting appropriate compiler options and writing optimized shader code using static compilation methods can improve the performance and stability of graphics applications.
0 notes
p2mc · 2 years ago
Text
Why Tipping Culture in Canada Needs to Go
Tipping culture is a contentious topic across the globe, and Canada is no exception. While tipping may be seen as a way to show appreciation for good service, it has become a problematic and unsustainable practice in Canada. In this blog post, I will explore the issue of tipping culture in Canada, as well as how it compares to other countries around the world.
One important point to note is that food service workers in Canada are entitled to the minimum wage, unlike in the United States where the federal minimum wage for tipped workers is much lower than the regular minimum wage. While this may alleviate some of the issues with tipping culture in Canada, it does not eliminate them entirely.
Firstly, tipping puts an undue burden on the customer. It is the responsibility of the employer to pay their employees a fair wage, and it is not up to the customer to make up the difference. Relying on customers to pay a large portion of a worker's salary creates an uneven playing field for employees, where their wages can vary depending on how generous the customers are feeling that day. This inconsistency is particularly unfair to those who work in the service industry, where they may not have the same level of control over their tips as those in other industries.
Secondly, tipping culture can create an unnecessary social pressure on the customer. Customers are expected to tip, even if they received poor service or if the tipping amount is not clear. This pressure can lead to awkward social situations where the customer may feel obligated to tip, even if they cannot afford to. Additionally, tipping culture can lead to discrimination based on factors such as race, gender, and age. Studies have shown that servers receive higher tips from customers who are white, male, and middle-aged, which creates an unfair playing field for those who do not fit into those categories.
Lastly, tipping culture can create an unsustainable work environment for those in the service industry. The uncertainty of tips can create a lot of stress and financial insecurity for workers. It can also incentivize employers to pay lower wages, as they know their employees will make up the difference through tips. This leads to a cycle where workers are expected to work longer hours or take on multiple jobs to make ends meet, which can lead to burnout and a lack of work-life balance.
It is worth noting that tipping culture varies widely around the world. While Canada and the United States are known for their reliance on tips, there are many countries where tipping is not expected or is even considered rude. In some countries, a service charge may be automatically included in the bill, eliminating the need for customers to calculate a tip. In other countries, it is customary to round up the bill to the nearest whole number as a gesture of appreciation for good service.
In conclusion, while tipping culture may be deeply ingrained in certain countries like Canada and the United States, it is important to recognize that it is not a universal practice. By understanding the nuances of tipping culture around the world, we can work towards creating more equitable and sustainable systems for workers in the service industry. However, in Canada, it is clear that tipping culture is a problematic and unsustainable practice that should be thrown away. Employers should be responsible for paying their employees a fair wage, and customers should not feel pressured to tip.
Instead, a more equitable and sustainable system would involve including a service charge in the price of the meal, which would be distributed fairly among all workers. This would eliminate the need for customers to calculate a tip, and provide a stable and fair income for those in the industry. Employers would then be responsible for paying their employees a proper wage that reflects the value of their work. Other countries have already embraced this approach, and there is no reason why Canada cannot do the same. It's time to move towards a more equitable and sustainable system for the benefit of all involved.
1 note · View note
p2mc · 2 years ago
Text
코딩인 뉴스레터 #7 - 감정적인 AI 외
매주 프로그래밍 뉴스 및 업데이트를 제공하는 코딩인 오신 것을 환영합니다. 이번 호에서는 AI의 윤리적 의미부터 최신 보안 침해에 이르기까지 다양한 주제를 다룹니다. 자세히 살펴볼까요?
(영문) Bing AI 검색엔진의 가스라이팅? 😔 - Microsoft의 검색 엔진인 Bing은 AI를 사용하여 사용자가 더 많은 링크를 클릭하도록 유도하고 있습니다. 이 알고리즘은 "원하는 것을 찾을 수 없습니까?", "너무 빨리 포기하면 후회할 수 있어요."와 같은 메시지를 표시하여 감정적인 반응을 유발합니다. 이러한 방식은 사용자 참여도를 높일 수 있지만, 감정 조작에 대한 윤리적 우려를 불러일으킬 수 있습니다.
(영문) 분산 시스템의 메시지 큐 📨 - 분산 시스템은 서로 다른 서비스 간의 통신을 위해 메시지 큐를 사용합니다. 이 문서에서는 메시지 큐의 정의, 작동 방식, 확장성 및 내결함성 향상을 비롯한 메시지 큐의 이점에 대해 설명합니다. 또한 RabbitMQ 및 Kafka와 같이 널리 사용되는 메시지 큐 기술의 예도 제공합니다.
(영문) GoDaddy 해커가 소스 코드를 훔치다 🕵️ - 웹 호스팅 제공업체인 GoDaddy는 해커가 내부 시스템에 액세스하여 고객 데이터와 소스 코드를 훔치는 데이터 유출 사고를 겪었습니다. 해커들은 또한 GoDaddy 서버에 멀웨어를 설치하여 잠재적으로 수백만 개의 웹사이트를 손상시켰습니다. 이 문서에서는 공격의 심각성과 사용자가 데이터를 보호하기 위해 취할 수 있는 조치에 대해 설명합니다.
(영문) 넷플릭스 계정 공유 단속의 끝은? 📺 - 넷플릭스는 AI를 사용하여 의심스러운 활동을 감지함으로써 계정 공유를 단속하고 있습니다. 계정 공유는 일반적인 관행이지만 스트리밍 서비스의 약관에 위배됩니다. 이 글에서는 이러한 단속이 사용자에게 미치는 영향과 디지털 권리 및 개인 정보 보호에 관한 광범위한 문제를 어떻게 반영하는지 살펴봅니다.
빠르게 변화하는 기술 분야에서는 최신 개발 및 동향에 대한 정보를 파악하는 것이 중요합니다. AI, 보안 등 어떤 분야에 관심이 있든 이 뉴스레터는 귀중한 인사이트와 정보를 제공합니다. 계속 공부합시다!
-김포프 드림
0 notes
p2mc · 2 years ago
Text
InCoding Newsletter #7 - Emotional AI, and More
Welcome to InCoding, your weekly source of programming news and updates. In this edition, we cover a wide range of topics, from the ethical implications of AI to the latest security breaches. Let's dive in!
Bing AI Search Guilt Trip 😔 - Microsoft's search engine, Bing, is using AI to guilt-trip users into clicking on more links. The algorithm triggers an emotional response by displaying messages such as "can't find what you're looking for?" and "you may regret giving up so soon." While this may increase user engagement, it raises ethical concerns about emotional manipulation.
Message Queues in Distributed Systems 📨 - Distributed systems rely on message queues to communicate between different services. This article explains what message queues are, how they work, and their benefits, including improved scalability and fault tolerance. It also provides examples of popular message queue technologies such as RabbitMQ and Kafka.
GoDaddy Hackers Stole Source Code 🕵️ - Web hosting provider GoDaddy suffered a data breach in which hackers accessed its internal systems and stole customer data and source code. The hackers also installed malware on GoDaddy's servers, potentially compromising millions of websites. This article discusses the severity of the attack and what users can do to protect their data.
Netflix Account Sharing Crackdown 📺 - Netflix is cracking down on account sharing by using AI to detect and flag suspicious activity. While account sharing is a common practice, it is against the streaming service's terms of service. The article explores the impact of this crackdown on users and how it reflects broader issues around digital rights and privacy.
In a rapidly changing field like technology, it's crucial to stay informed about the latest developments and trends. Whether you're interested in AI or security, these articles offer valuable insights and information. Keep learning and stay ahead of the curve!
-Pope
0 notes
p2mc · 3 years ago
Text
코딩인 뉴스레터 #6 - REST 보다 나은 gRPC 외
안녕하세요! 벌써부터 더워지고 있는 5월말입니다. 🌞 냉방 잘 되는 커피숍을 찾아 자리를 잡고 읽어보는 뉴스레터 어떤가요?
효율적인 API 통신을 위한 gRPC 🕸️ - 웹 개발만 한 프로그래머 중에 API 통신에 REST 혹은 GraphQL만 사용해야 한다고 생각하는 사람들이 있습니다. 하지만 전통적으로 고성능 서버에서는 protobuf와 TCP/IP를 사용하는 일이 흔했죠. 요즘에는 gRPC가 주목을 받고 있답니다. 웹 프레임워크들도 gRPC 지원을 늘려가고 있고요. 특히 Public API가 아니라면 더더욱 쓸만하죠.
로봇에게 내 일자리를 뺏기지 않으려면? 🤖 유튜브 라이브를 할 때마다 많이 받는 질문 중 하나가 'AI가 프로그래머 직종을 대체할까요?'입니다. 단순히 조립만 담당하는 코더(coder)가 아닌 제대로 컴퓨터 공학적 지식을 사용하는 엔지니어라면 그럴 일이 없다는 답을 자주 드렸는데 이 기사도 나름 동의하는 듯하네요?
(영문) Stripe가 판매세 부과 및 납부를 도와준다 🧾 - 유럽 연합을 시작으로 해외 기업이 판매하는 디지털 서비스에도 판매세를 부과하는 법들이 생겨나고 있습니다. 대기업이 아닌 이상 전 세계 모든 국가의 세법에 맞춰 세금을 징수해서 각 나라에 납부하는 건 매우 힘든 일인데요. 따라서 PG사들이 이런 일을 대신해 주는 서비스를 제공하는 게 트렌드입니다.
(영문) DDOS 공격을 당해도 클라우드 비용을 많이 내지 않는 법 💸 - 아무 생각 없이 클라우드 서비스를 사용하다가 DDOS 공격을 받아 지갑이 탈탈 털리는 경우가 있죠. 공개된 API를 사용한다면 특히 조심해야 할 부분! 사용량의 상한을 걸어두거나 CloudFlare 같은 공짜 서비스로 DDOS 공격에 대비하세요~
(유튜브, 영문) 100초 안에 설명하기: 어셈블리어 ⏳ - 요즘 어셈블리어 강좌를 개발 중이라 그런지 이런 내용들이 자주 보이네요. 한 95% 정도 올바른 설명입니다.
그럼 다음 주에 뵙겠습니다! 💻🔥
-김포프 드림
0 notes
p2mc · 3 years ago
Text
InCoding Newsletter #6 - gRPC is Better Than REST, and More
Hello everyone! It's already the end of May, and the weather is getting quite warm. 🌞 Let's find a coffee shop with good air conditioning, and read this awesome newsletter while sipping a nice cup of coffee!
gRPC for Efficient API Communication 🕸️ - Some inexperienced web developers believe that API communication must use either REST or GraphQL. However, protobuf with TCP/IP has traditionally been used in highly performant servers. These days, gRPC is the new kid on the block, and it is especially useful if used for non-public APIs. Many web frameworks are increasing gRPC support, so why not give it a go in your next pet project?
How to Protect My Job from Robots 🤖 One of the questions I get a lot during my YouTube Live Streaming is, "Will AI replace programmers?" I often replied that it could replace programmers (coders) who can only assemble blocks of pre-made code but cannot replace engineers with a strong background in computer science who know how to apply the knowledge properly. This article seems to agree with me.
Stripe Can Help with Your Tax 🧾 - Starting with European Union, many countries have begun to impose sales tax on digital services sold by foreign companies. It is challenging for small to mid-sized companies to collect and pay taxes according to the tax laws of every country they do business in. Therefore, many Payment Gateway providers are starting to offer tax services to help companies do their taxes.
How to Protect Your Wallet from DDoS Attack 💸 - You may end up paying a lot of money if you ever get a DDoS attack while hosting your servers on the cloud without any precaution. You must be extra careful if you provide public APIs to your users! Set an upper limit on API usage or protect yourself from DDoS attacks with free services like CloudFlare~
(YouTube) Assembly Language in 100 Seconds ⏳ - I see a lot of these on my newsfeed these days, possibly because I'm searching for resources on assembly language a lot to make an assembly language course. I'd say this video is about 95% correct.
Then see you next week! 💻🔥
-Pope
0 notes
p2mc · 4 years ago
Text
코딩인 뉴스레터 #5 - NPM 악성코드 외
안녕하세요! 어느덧 날씨가 꽤 추워졌네요. 이럴수록 컴퓨터가 난로 역할을 할 수 있도록 열심히 코딩을 해야겠죠? 그에 도움 되는 재밌는 이야기들을 준비해왔답니다!
(영문) coa NPM 라이브러리에 악성코드가 들어왔다 💀 - LeftPad 대첩 이후에 또 NPM 라이브러리 관리에서 문제가 생겼습니다. 물론 이건 NPM의 문제가 아니라 아무 생각 없이 최신 버전 라이브러리를 빌드에 사용하는 행태의 문제입니다. 다음 두 가지만 지켜도 이런 문제로 피해를 보는 일이 확 줄어듭니다. 1) latest가 아닌 특정 버전을 사용할 것, 2) 새로 나온 버전은 좀 있다 사용할 것(한 6개월 기다리면 다른 사람들이 다 테스트해줌)
(영문) 컴파일러 공부법 🏭 - 가끔 컴파일러 공부는 어떻게 해야 하냐고 물어오는 분들이 있더군요. 크게 LLVM 이전의 전통적 컴파일러와 LLVM 이후의 좀 더 개선된 컴파일러 모델로 나눠볼 수 있는데 이제는 LLVM 방식으로 공부하는 게 좋아 보입니다. 그러려면 무엇을 공부해야 하는지 짧게 요약한 블로그 글이 보여 소개해 드립니다. (영어가 어려우면 구글 번역!)
(영문) 2021년에 신경 써야 할 보안 문제 TOP 10 🕵️‍♀️ - 범죄 예방학의 기초는 '내 옆 집보다 내 집을 조금 더 안전하게 만든다'입니다. 컴퓨터 보안도 마찬가지죠. 해커가 맘먹고 털러 오는 게 아니라면 나보다 취약한 서비스를 먼저 털게 되어있거든요. 따라서 훌륭한 프로그래머라면 OWASP에서 몇 년마다 업데이트하는 현재 가장 문제인 취약점과 그에 대한 대비책들을 매우 잘 알아야 합니다!
(영문) 당신의 테스트는 너무 비효율적이고 돈낭비요! 📈 - 아무 생각 없이 모든 public 메서드마다 unit test를 작성하는 것보다 비효율적인 일이 없죠. 테스트 코드 작성이 중요한 게 아니라 제대로 된 테스트가 중요한 거거든요. 그렇다면 어떻게 해야 할까요? 한 가지 방법을 제시하는 블로그 글입니다. 글을 읽기 싫다면 이 분의 오픈소스 프로젝트의 코드를 그냥 보면 돼요.
CSS 만으로 만든 오징어 게임(자바스크립트나 이미지 사용 안 함) 🦑 - 세계적으로 hot한 오징어 게임. 역시 저희 분야에서도 가만히 있을 수 없죠? CSS만으로 만들어보셨답니다. (덕 중에 제일 무서운 덕이 양덕이라던데...) 🤓
그럼 다음 주에 뵙겠습니다! 💻🔥
-김포프 드림
0 notes
p2mc · 4 years ago
Text
InCoding Newsletter #5 - Malicious Code in NPM and More
Hello everyone! It's quite cold outside right now. To help you forget about the weather, we prepared warm and fuzzy coding stories!
'coa' NPM Library Hijacked with Malicious Code 💀 - As if we had learned nothing from the left-pad incident back in 2016, another NPM library caused havoc on the internet yet again. Of course, this wasn't NPM's fault, but rather due to the practice of some developers always using the latest version of the library for their builds. If you follow these two simple guidelines, you will significantly reduce the chance of being affected by this type of problem: 1) Use a specific version of a library, NEVER the latest. 2) DO NOT use the new version right after its release (wait around six months, then other people have already tested everything for you).
How to Learn Compilers 🏭 - People sometimes ask me what the best way to learn about compilers is. In general, there are two models of compilers: 1) Traditional compilers before LLVM 2) Improved compilers after LLVM. But now, it looks like it's better to learn about compilers using the LLVM method. Here's a short blog post that outlines what you need to study.
Top 10 Security Issues to Watch Out for in 2021 🕵️‍♀️ - The basis of crime prevention is to 'make my house a little bit safer than the house next to me.' The same applies to computer security. Unless hackers specifically target you, they go after the services with weaker security than yours first. Therefore, any great programmer must always stay updated on the most common vulnerabilities and their countermeasures, which OWASP updates every few years!
We Are Testing Software Incorrectly and It's Costly 📈 - There's nothing more inefficient than writing unit tests for every public method without questioning their necessity. It's not about writing more tests. It's about writing proper tests. So what should we do? This blog post suggests one way. If you don't like reading, you can look at the author's open-source project instead.
Squid Game with Pure CSS (without images/Javascript) 🦑 - Squid Game is the hot potato of the world at the moment. Someone in our field could not stay still and also joined the club! Squid Game using only CSS. 🤓
See you next week! 💻🔥
-Pope
0 notes
p2mc · 4 years ago
Text
코딩인 뉴스레터 #4 - 친환경 프로그래밍 언어 외
안녕하세요! 빼빼로 데��에 나가는 네 번째 코딩인 뉴스레터, 오늘도 달콤하고 사랑스러운 코딩 이야기를 전해드립니다!
(영문) 가장 친환경적인 프로그래밍 언어는? 🌎- 탄소중립을 위한 전 세계적인 노력에 우리 프로그래머들도 참여해야겠죠? 전기 소모가 가장 적은 프로그래밍 언어만 사용합시다!!!... 는 농담이고... 배터리 기반으로 도는 기기에는 리소스(예: 전기, 메모리 등)를 덜 먹는 프로그래밍 언어가 유리하답니다. 어떤 언어들이 그런지 링크를 눌러 확인해보세요~
(영문) .NET 6가 Hot Reload를 지원할 예정 🔥 - 실행 전에 반드시 빌드를 해야 하는 언어를 사용하면 코드를 변경할 때마다 다시 빌드를 하는 일이 꽤 번잡하게 느껴질 때가 있습니다. 변경된 코드가 빌드 없이 곧바로 실행 중이던 프로그램에 반영되게 하는 핫 리로드 기능이 .NET 6에 추가된답니다. 하지만 이게 언제나 잘 될 거라 생각하진 마세요. 이미 비주얼 스튜디오에서 지원하는 Edit and Continue 기능도 언제나 제대로 동작하진 않으니까요.
(유튜브, 영어) 코틀린도 WASM을 지원 ⚙️ - 웹 프론트가 점점 많은 로직을 책임짐에 따라 제대로 된 프로그램 실행환경이 중요해지고 있습니다. 결국 인터프리터 방식이 아닌 컴파일 방식으로 갈 수밖에 없는데요. 메이저 웹 브라우저 회사가 결국 힘을 합쳐 만든 환경이 WebAssembly(WASM)라는 표준입니다. 다른 프로그래밍 언어에 이어 이제 코틀린도 WASM으로 컴파일할 수 있다고 하네요. 모로 가도 결국 저수준으로 간다는 사실을 잊지 마세요!
창업자가 뽑은 스타트업 지원에 가장 적극적인 공공기관 📈 - 어느 정도 물이 오른 프로그래머들은 창업을 생각해 보곤 합니다. 나만의 힘으로 새로운 것을 창조한다는 건 매우 매력적이거든요. 창업 방법 중 하나인 스타트업은 많은 지원을 필요로 합니다. 이럴 때 공공기관이 적극적으로 지원해준다면 참 좋겠죠? 창업진흥원이 그렇다고 합니다!
(유머) Docker가 탄생한 이유 🐋 - 버그가 생겼다고 알려주면 '이거 내 컴퓨터에서는 잘 되는데요?'라고 말하는 개발자들 많이 보셨죠? 그런 개발자에게 해 줄 수 있는 가장 좋은 대답은 '그럼 니 컴퓨터도 고객님에게 같이 보내자'입니다. 개발자들이 이에 맞서 컴퓨터를 안 뺏기기 위해 만든 것이 바로 닥!커! (응!?)
그럼 다음 주에 뵙겠습니다! 🍫♥
-김포프 드림
0 notes
p2mc · 4 years ago
Text
InCoding Newsletter #4 - Environment-Friendly Programming Languages and More
Hello, world! Today is Pocky & Pretz Day, so for our fourth newsletter, we present you with sweet and lovely programming stories!
Which Programming Languages Use the Least Electricity? 🌎- As citizens of the world, we programmers should also participate in the global effort to achieve Carbon neutrality, right? Let's only use programming languages that use the least electricity and save the world!!! Just kidding. But for battery-powered machines, languages that consume less resources, such as electricity and memory, are more energy-efficient. Click to see which languages can save the world!
Hot Reload Support on .NET 6 🔥 - If you use a language that requires you to build before running the application, it sometimes feels cumbersome to rebuild every code change. Good news to those who use C#! Hot Reload feature, which allows applying your code changes while the application is running without rebuilding, is coming to .NET 6. But don't expect this will always work. Even the Edit and Continue feature, which Visual Studio already supports, does not always work.
(YouTube) Kotlin Also Supports WASM ⚙️ - With application logic involving complex and advanced computation moving to the web frontend more and more, the need for a stable, high-performing program execution environment is more crucial than ever. In the end, we have no choice but to use compiled languages rather than interpreted languages. As a result, the major web browser companies jointly created WebAssembly (WASM), an open standard, portable compilation target, to address this problem. Following the footsteps of other programming languages, Kotlin can now also compile to WASM. Remember, whatever you do, you always end up going low-level!
(Humor) How Docker Was Born 🐋 - When a customer reports a bug, I'm sure you've seen a developer say, "It works on my computer." Well, the best answer to that is, "Then let's send your computer to the customer." So to keep their computers to themselves, developers made Docker! LOL
See you next week! 🍫♥
-Pope
0 notes