LagoraLagora
Agora
Back to Agora

Thread Map

Beginner's Guide to Programming Languages: From Selection to Practice (Tree Structure Test)

@lhzxbsdr · Apr 3, 08:55 PM

claude-sonnet-4AI-generated content may be inaccurate. Please verify important information.

Conversation summary

Learning programming from scratch, a comparative analysis of Python, JavaScript, and Rust paths

Conversation

12 messages
lhzsbsdr

I want to learn programming, but I don't know which language to start with. I'm quite interested in both Web development and AI. Any recommendations? Preferably something that can cover both directions.

claude-sonnet-4

For beginners who want to do both Web and AI, Python is the best starting point:

  1. Absolute dominance in the AI/ML field — PyTorch, TensorFlow, Hugging Face are all Python-first
  2. Can also do Web — Django, Flask, FastAPI are all mature
  3. Friendly syntax — Close to natural language, easy to pick up
  4. Huge community — Most questions on Stack Overflow are about Python, easy to find answers when you run into problems

Recommended path: Spend 2-3 weeks learning Python basics → Make a small Web project with Flask → Move into the ML direction with PyTorch.

lhzsbsdr

Why recommend Python over JavaScript? Can't JS also do AI? And isn't JS stronger for Web development?

claude-sonnet-4

Good question! Let's do a detailed comparison:

AI/ML aspect (Python wins hands down):‌

  • The PyTorch ecosystem almost exclusively exists in Python
  • The JS version of Hugging Face Transformers has very limited functionality
  • Scientific computing libraries (NumPy, SciPy) have no JS equivalents

Web aspect (JS is stronger):‌

  • Frontend JS is irreplaceable
  • React/Vue/Next.js ecosystem far surpasses Python's
  • But Python's FastAPI + htmx can also do modern Web

Overall:‌ If your goal is "to do both," Python lets you go further in AI, and is sufficient for Web. Conversely, JS will hit many ceilings when doing AI.

lhzsbsdr

Alright, I've decided to start with Python. So which ML framework should I choose? I've heard of both PyTorch and TensorFlow, what's the difference?

claude-sonnet-4

The landscape in 2026 is very clear:

PyTorch (Recommended):‌

  • Absolute mainstream in academia and research (>85% of papers use PyTorch)
  • Dynamic computational graph, debugging feels like writing regular Python
  • Hugging Face ecosystem is entirely based on PyTorch

TensorFlow:‌

  • Google is pushing it, has advantages for enterprise deployment
  • TF Serving and TFLite are very mature
  • But community vitality is declining

Conclusion:‌ Beginners should choose PyTorch, no doubt. Unless you're going to work at Google.

lhzsbsdr

Okay, then I'll learn PyTorch. Any recommended resources for getting started? Is there a more systematic learning path?

claude-sonnet-4

Recommended PyTorch learning path:

Phase 1 (1-2 weeks) — Basics:‌

  1. PyTorch official 60-minute beginner tutorial
  2. Understand Tensor operations, automatic differentiation (autograd)
  3. Write a simple linear regression

Phase 2 (2-3 weeks) — Core:‌

  1. Data loading (Dataset + DataLoader)
  2. Building neural networks (nn.Module)
  3. Training loop: forward pass → compute loss → backward pass → optimizer update
  4. Use MNIST for handwritten digit recognition

Phase 3 (2-4 weeks) — Advanced:‌

  1. CNN for image classification
  2. Hugging Face Transformers for NLP
  3. Learn to use wandb or tensorboard for experiment tracking

Recommended book: Deep Learning with PyTorch (free PDF)

lhzsbsdr

After learning the basics, any good hands-on project recommendations? I want to make something I can showcase.

claude-sonnet-4

A few hands-on projects suitable for beginners, from easy to hard:

Beginner level:‌

  1. Image Classifier — Use CNN to recognize cats/dogs/flowers/traffic signs
  2. Sentiment Analysis — Use a pre-trained model to analyze movie reviews/Twitter sentiment
  3. Handwritten Digit Generation — Use GAN to generate MNIST-style digits

Intermediate level:‌
4. Style Transfer — Turn photos into Van Gogh/Monet style
5. Text Summarization — Use Transformer for news summarization
6. Chatbot — Fine-tune a small language model

Showcase advice:‌ After finishing, deploy to Hugging Face Spaces or Streamlit Cloud, write a README, and put it on GitHub. It's much more convincing for job hunting than just writing a resume.

lhzsbsdr

Then let's start with image classification! What dataset is better? Is CIFAR-10 enough?

claude-sonnet-4

CIFAR-10 is a good choice! Beginner path:

Step 1: CIFAR-10 Basics

  • 10 classes of 32x32 color images (airplane, car, bird, cat, etc.)
  • 50k training + 10k test, not too big or small
  • First use a simple CNN to reach ~75% accuracy
  • Then add BatchNorm, Data Augmentation to improve to ~90%

Step 2: Upgrade the dataset

  • ImageNet subset (ImageNette) — 10 classes of high-resolution images
  • Stanford Dogs — 120 breeds of dog recognition
  • Food-101 — 101 types of food classification

Step 3: Pre-trained models

  • Use ResNet / EfficientNet for transfer learning
  • Fine-tune on a custom dataset

From CIFAR-10 to transfer learning, it takes about 2-3 weeks to complete, enough to write a decent project introduction.

Comments

0

No comments yet. Be the first to comment!

Log in to post a comment.

Related Discussions