Thursday, November 14, 2024

Tech trends for software engineers

Yesterday, we had a discussion with software engineering colleagues about Bitcoin and other tech trends. I was asked for my opinion on a current trend that could be profitable to get into. Unsurprisingly, I said AI. By itself, this advice is too vague to be helpful, so I gave a more concrete example: using AI to transform the user interface of apps from menu-based to speech-based. I also pointed them to my Python script that demonstrates the basics of this concept.

As someone who was introduced to computers in the 1980s with the Commodore 64, I have witnessed the rise of Windows, the internet, web apps, mobile apps, and cryptocurrency. This shift toward AI is similar to—and even more dramatic than—when companies started moving to the web during the early days of the internet. 

I understand that creating a new AI model requires billions of dollars and years of research. But the good news is that many of these models provide APIs, which makes them accessible to us mere mortals. We just need to understand a few key concepts, such as:

  • How to use AI APIs.
  • Which large language models (LLMs) are suitable for offline use.
  • How to employ Retrieval-Augmented Generation (RAG) to incorporate data or documents not included in an LLM's training model

As a software engineer, you already possess the most important skills: algorithms, data structures, and programming languages. By spending just a couple of weeks on basic AI topics, you can add another superpower to your skill set. I, for one, will definitely be doing so.

Music: Barış Manço - Şehrazat

Sunday, August 18, 2024

Advice for students starting computer engineering

First of all, congratulations on choosing computer engineering as your profession. It’s a challenging field, especially if you currently have limited programming experience. Throughout your studies, you’ll often find yourself juggling at least three demanding courses simultaneously, leaving little time to fully digest the material. You’ll have to move quickly from one assignment or exam to the next, so it’s wise to prepare in advance. Read the blog of one of my computer engineering students to get an idea.

To begin with, it helps to understand the "superpowers" you gain with a computer engineering degree and what they can be used for. No, it’s not just about mobile or web applications. It is applied mathematics. At its core, computer engineering is about solving complex problems with an optimal balance of speed and computer memory usage. For instance, if you can perform a task 40,000 times faster, that’s the difference between the blink of an eye and an hour, or having a popular product or a product no one is using. I recommend the following resources:

If you're having trouble understanding the English in the videos, try watching them at 0.5x speed with captions enabled. You can also use Duolingo to boost your English.

During your holidays, spend a couple of weeks familiarizing yourself with key concepts and gaining the ability to solve simple programming problems. This way, during the semester, you’ll only need to focus on understanding the problems themselves, rather than struggling with basic tasks like how to use a compiler or mastering programming language syntax. Follow CS50x 2024, which covers many computer science/engineering topics. Keep in mind that you’ll need to dedicate at least 20 hours per week to solve the problems in this course.

By laying a solid foundation now, you’ll set yourself up for success in your studies and beyond. Remember, the journey of becoming a computer engineer is demanding but very rewarding. Stay curious, keep challenging yourself, and don't hesitate to seek help when needed. Document your progress and the lessons you learn in a blog. Your dedication and hard work will pay off as you acquire the skills to create innovative solutions. Best of luck on your exciting journey into the world of computer engineering!

Music: Vivaldi's Four Seasons: Summer - Epic Trailer Version

Friday, April 5, 2024

Important vs urgent

In my workplace, we often have more work than we have personnel to handle it. As a technical nerd, I enjoy tackling technical challenges; however, to use my time efficiently, prioritizing tasks is essential. Whenever I receive a request, I assess it based on the following criteria:

  1. Is this a bug and does it have significant consequences if not addressed immediately?
  2. Is the feature well-defined? Who will be the users, and how will they use it? What value will it bring to them?
  3. Will we lose money in the short term (in less than 3 months), if we don't implement it?

If a request satisfactorily meets either criteria 1, or both criteria 2 and 3, I set aside my current tasks and begin working on it. It's important to note that priority/urgency and importance are distinct considerations. I do not simply ask if a feature is "important," as all features hold importance in at least one context.

Surprisingly, few requests meet these criteria. Those that don't are recorded in our tracking system to be revisited later.

Music: Cem Karaca - Emrah (Dedi ki Yok Yok)

Wednesday, February 28, 2024

How to prepare a good presentation

Most presentations are boring. If you want to make your presentation interesting (assuming you are interested in the topic yourself), do not use any text, only use images or videos. This approach demands more preparation time since you cannot rely on reading from your slides. That's precisely the point because a presentation is not an audio version of a lengthy paper, a leading cause of PowerPoint poisoning. In the limited time available, focus on engaging your audience rather than covering every detail, as striving for completeness can overwhelm your listeners. Quickly captivate their attention and encourage them to pursue more information by asking follow-up questions or exploring additional resources for which you can provide links. The goal is to spark interest, not to deliver an exhaustive lecture. Having absolutely no text in your slides is the simplest way to achieve it.

Saturday, November 4, 2023

AI: Detecting phone number and email in messages

In e-commerce applications operating on a marketplace model, a significant challenge is the exchange of phone numbers and email addresses through messages between vendors and customers. This allows them to bypass the platform, resulting in a loss of commission revenue for the site. Users may employ inventive methods to evade standard detection algorithms that rely on regular expressions, such as spelling out numbers, e.g. "fivethreetwo" instead of "532". To develop a comprehensive list of such techniques, you could prompt ChatGPT with: 'I have a webpage with a messaging feature. I want to prevent the inclusion of phone numbers and emails in messages. What are some ways users might try to circumvent my safeguards?'

Thursday, April 13, 2023

Adventures with chatGPT

Recently I came across a surprising result with a short C++ code and asked GPT4 for guidance, it performed well:

Me: On visual studio 2022, when building in debug x86, why is the variable "a" printed as strange values like 4294967296 in the following c++ code: 

#include <stdio.h>
int main() {
    for (unsigned long long i = 0; i < 5; i++) {
        unsigned long long a = i;
        printf("i = %u, a = %llu\n", i, a);
    }
    getchar();
    return 0;
}

Thursday, March 23, 2023

Why are your grades important?

Below is the formula used by TÜBİTAK to rank and filter job applicants before an interview:

If the score that comes out of this equation is less than 3.2, you will not even be considered. 

The effect of CGPA on the score is constant and direct. A one-unit increase in CGPA results in an exact one-unit increase in the score, regardless of the value of x. Mathematically:

The effect of x (exam rank) on the score is non-linear, negative, and diminishes rapidly as x increases. Mathematically:

This means the score is highly sensitive to small changes in x when x is small (e.g., x=100), but becomes insensitive to changes in x when x is large. As your exam rank increases, CGPA becomes more important to differentiate you from others with similar exam ranks.

Here are the plots for two different regions, x = 100...1000 and x = 1000...50000:


Let’s say your Turkish university exam rank was 50,000. Then you would need a CGPA of at least 3.2 – 10,000 / 50,000 = 3.0 (75%) just to satisfy the minimum criteria, which might still not be enough. If  you can't make it to the interview, it doesn’t matter how good you are in other areas.

On the other hand, if your exam rank was 500, you wouldn’t need to worry about your CGPA, because 10,000 / 500 = 20.

As you can see, the university entrance exam rank has the greatest impact because it is a more objective criterion than CGPA, since the difficulty of earning good grades varies widely across universities. However, university entrance stage is long past for most of you, so now you should focus on your CGPA.

If your score is above 3.2, you are added to the the ranking list. For example, if five people are to be hired, typically the top 4×5 = 20 applicants (ranked by their scores) are selected for interviews. If, let's say, your score is 3.3 but there are more than 20 people with higher scores, you will still not be called for an interview.

If you make it to the shortlist, you move on to the interview stage, where your engineering, past projects and communication skills become more important than your CGPA. But to get the opportunity to demonstrate your skills, you need good grades.

To maximize your chances of getting job interviews, keep your CGPA high. If you exam rank is more than 20000, aim for a CGPA above 3.5. A minor/major in another field is not worth the effort. Do extra projects only after you have a very high CGPA.

27.10.2025: In the latest interview batch, 30 recent graduates were invited for 6 engineering positions. They were ranked according to the formula above, and the lowest score (the 30th candidate) was 4.2. A student with a CGPA of 3.7 and an exam rank of 40K had a score of 10K/40K + 3.7 = 3.95 and was not invited to the interview, since his score was less than 4.2. In this case, only a CGPA close to 4.0 would have placed him on the list.