Coding
Let’s look at the five languages that you’re most likely to use and encounter as an AI Engineer.
This Lesson Will Cover
- 🐍 Python
- 🛢️ SQL
- 🌐 JavaScript / TypeScript
- 🖥️ C++
- ☕ Java
You won’t see C++ and Java in many introductory AI Engineering courses. I included them here because, when I was researching what to include in this course, I kept seeing these languages appearing in AI Engineer job postings[1].
Python
Python’s simplicity, readability, and vast ecosystem make it the most popular choice for data professionals.
As an AI Engineer, you absolutely must know Python. And if you’re taking this course, then you probably already do.
Here’s what you can do with Python:
- Data visualization and dashboards
- Web scraping and data collection
- Data preprocessing and cleaning
- Building and training machine learning models
- Deep learning and neural networks
- Deploying AI models to production
Python Learning Roadmap
- Basic Syntax: Learn variables, loops, and functions.
- Data Structures: Master lists, dictionaries, and sets.
- Libraries: Get familiar with AI libraries like NumPy, Pandas, and scikit-learn.
Example: A Simple Machine Learning Workflow in Python
from sklearn.datasets import load_iris
from sklearn.tree import DecisionTreeClassifier
import numpy as np
# Load dataset
data = load_iris()
X, y = data.data, data.target
# Train a model
model = DecisionTreeClassifier()
model.fit(X, y)
# Make predictions
random_indices = np.random.choice(len(X), 5, replace=False)
predictions = model.predict(X[random_indices])
print(predictions)
# Output: [1 2 0 1 1]
SQL
SQL is essential for AI Engineers as it’s the standard language for working with structured data in databases.
When I first saw it, I hated it. It looked so ugly and clunky compared to Pandas syntax.
It’s super old, and it’s not going away anytime soon. It’s the undisputed heavyweight champion of the database query language world.
And you know what? I actually learned to love it.
Here’s what you can do with SQL:
- Extract features from large datasets for model training
- Join multiple data sources to create comprehensive training sets
- Aggregate and transform data for feature engineering
- Create views for model performance monitoring
- Filter and preprocess data for machine learning pipelines
- Monitor model metrics and data drift with validation queries
SQL Learning Roadmap
- Basic Queries: Master SELECT, WHERE, GROUP BY, and JOIN operations.
- Data Manipulation: Learn INSERT, UPDATE, and DELETE statements.
- Window Functions: Understand queries like ROW_NUMBER.
- Performance: Write efficient queries and understand indexing.
Example: A Typical Data Preparation Query for ML
WITH feature_engineering AS (
SELECT
user_id,
COUNT(*) as transaction_count,
AVG(amount) as avg_amount,
SUM(amount) as total_spend,
MAX(transaction_date) as last_transaction
FROM transactions
GROUP BY user_id
)
SELECT
f.*,
CASE
WHEN total_spend > 1000 THEN 'high_value'
ELSE 'regular'
END as customer_segment
FROM feature_engineering f
WHERE transaction_count >= 5;
JavaScript / TypeScript
AI solutions often require integration with web applications for deployment, and JavaScript is by far the most dominant language for front-end web development.
TypeScript is a superset of JavaScript. It adds static typing and other features for building more robust applications, and transpiles to JavaScript.[2]
Here’s what you can do with JS/TS:
- Scalable front-end web application development
- API and back-end service development
JS/TS Learning Roadmap
- Type System: Understand the basics of TypeScript’s type annotations, interfaces, and generics.
- Modules and Imports: Learn how to structure and organize code for large projects.
- Frontend Frameworks: Gain some familiarity with React.
- Backend Frameworks: Work with Node.js and a framework like Express for API development.
Example: A Simple JavaScript API with Express
import express, { Request, Response } from 'express';
const app = express();
const port = 3000;
app.get('/hello', (req: Request, res: Response) => {
res.json({ message: 'Hello, World!', timestamp: Date.now() });
});
app.listen(port, () => {
console.log(`Server running at http://localhost:${port}`);
});
C++
C++ is a dominant language for high-performance systems, and some AI Engineer roles require experience in this area.
Here’s what you can do with C++:
- High-performance AI solutions
- Framework and library extensions (e.g., TensorFlow, PyTorch)
- Real-time AI applications
- Integration with robotics and game engines
C++ Learning Roadmap
- Memory Management: Understand pointers, references, and dynamic memory allocation.
- Object-Oriented Programming: Learn classes, inheritance, and polymorphism.
- Templates and STL: Get familiar with C++ templates and the Standard Template Library (STL).
- Concurrency: Learn multithreading and parallel processing.
Java
Java is widely used for enterprise AI applications and big data platforms.
Here’s what you can do with Java:
- Enterprise AI software and API development
- Big data and distributed systems (e.g., Apache Spark, Hadoop)
Java Learning Roadmap
- OOP: Learn classes, inheritance, polymorphism, and interfaces.
- Concurrency: Multithreading and synchronization.
- Data Structures: Work with ArrayList, HashMap, LinkedList.
- Big Data Tools: Use Apache Spark or Hadoop.
Learning How to Code
Practice Projects
The best way to learn coding is by building projects. Here are a few ideas:
- Explore a Kaggle dataset in Jupyter Notebook.
- Build a chatbot using OpenAI’s API.
- Develop a web scraper for Wikipedia.
- Create a recommendation system for movies.
- Train an image classifier using TensorFlow or PyTorch.
Or better yet, come up with your own! The best projects are the ones you create yourself.
Use Learning Resources
- LLMs: Large language models are fantastic for old, well-established technologies.
- Documentation: Official docs are trustworthy (99.99% of the time).
- GitHub: Source code never lies! It fills in the gaps left by documentation.
Conclusion
I’ll be honest - I don’t know how to code in C++ or Java. But I managed to compile and run these examples with surprisingly little effort. So maybe there’s hope for me yet!
But here’s the thing - I don’t feel like I need to learn them. Sure, it would be beneficial, but I’ve got other things to do. If I ever need them, I’m confident that I can pick them up quickly.
What are you going to focus on?
Key Takeaways
🐍 Python is essential for AI Engineering.
🗄️ SQL is necessary for working with structured data.
🌐 JavaScript / TypeScript is useful for deploying AI applications.
⚡ C++ is used in high-performance and embedded AI.
🏢 Java is key for enterprise AI and big data.
Next: Machine Learning and Deep Learning
Next up is ML and Deep Learning. Let’s get it!
Footnotes
I made a video about my research: 100 AI Job Postings Later… Here’s What’s Actually in Demand. ↩︎
Transpiling is a subset of compiling. Transpilers are also known as source-to-source compilers. You can read more about this obscure topic here on stackoverflow! ↩︎
Comments (0)
No comments yet.