今日已更新 339 条资讯 | 累计 19899 条内容
关于我们

标签:#science

找到 338 篇相关文章

AI 资讯

🚀 Mastering OOP for Interviews : Understanding Abstraction from First Principles (C++)

Series: Master OOP for Software Engineering Interviews Introduction Ask ten beginner developers: "What is abstraction?" Most answers sound like this: "Abstraction is the process of hiding implementation details and showing only essential information." Technically, that's correct. But if I ask the next question: "Why was abstraction invented?" or "Can you explain abstraction using an Inventory Management System?" or "How is abstraction different from encapsulation?" many candidates struggle. That's because they memorized the definition instead of understanding the idea behind it. In this article, we'll learn abstraction the way experienced software engineers think about it—not by memorizing definitions, but by understanding why it exists, what problem it solves, and how it appears in every modern software system. 🎯 Learning Goals After reading this article, you should be able to: Explain abstraction without memorizing a textbook definition. Understand why abstraction exists. Identify abstraction in everyday life. Recognize abstraction in software systems. Confidently answer beginner interview questions. Build a strong mental model that makes future OOP concepts easier. Before We Learn Abstraction... Let's ask an important question. Why do programming languages even provide OOP? Imagine writing software for an e-commerce company. The system contains: Products Customers Orders Warehouses Payments Delivery Partners Notifications Discounts Reviews Thousands of features. If every developer had to understand every implementation detail before writing code, software development would become impossible. We need a way to reduce complexity. That solution is called abstraction. The Problem Abstraction Solves Imagine buying a new car. You sit inside. You: Press the accelerator. Turn the steering wheel. Shift gears. Press the brake. Simple. But underneath the hood, hundreds of complex operations happen every second. The engine burns fuel. The pistons move. The gearbox changes tor

2026-07-15 原文 →
AI 资讯

Design + Product Thinking: NYC’s Path to Reliable AI

Design + Product Thinking: NYC’s Path to Reliable AI AI delivers value when it’s useful, trusted, and operational. For city services that affect millions, those qualities don’t happen by accident — they come from applying design thinking (who the service is for, how it’s used) together with product thinking (what outcome we’re trying to achieve and how we operate over time). This article explains why hiring designers and product managers matters for NYC’s digital and AI initiatives, summarizes the city’s PIT Crew program, and outlines how Flamelit applies outcome-focused delivery in the public sector. Why design and product roles matter Designers and product managers have distinct but complementary responsibilities that reduce common AI delivery failures: Designers (Design Thinking): center human needs, prototype user flows, and validate that interfaces and decision workflows are understandable and accessible. They surface usability and trust issues early, preventing technically accurate models from becoming unusable in practice. Product managers (Product Thinking): define the measurable outcomes, prioritize use cases, align stakeholders, and manage the lifecycle from discovery to ongoing operations. They ensure work is evaluated against mission impact, not just technical metrics. Together they prevent common failures: building technically impressive models that nobody trusts, deploying brittle systems without human review, or shipping features with unclear ownership that decay in production. PIT Crew and NYC hiring context NYC’s PIT Crew program is a city initiative designed to attract and staff product, engineering, and design talent for public service projects. It’s a practical recognition that public-sector digital transformation needs people skilled in user research, product management, and delivery. Read more about the PIT Crew and how it works here: https://www.nyc.gov/content/pitcrew/pages/ (open in a new tab). Hiring programs like PIT Crew help create the c

2026-07-15 原文 →
AI 资讯

# Understanding Backtracking Through a Tetris Optimizer in Go

When I first heard the term backtracking , it sounded like a complicated algorithm reserved for computer scientists. After spending the last couple of weeks learning it and implementing it in a Tetris Optimizer project, I realized something surprising: Backtracking is simply the art of making a decision, checking whether it works, and if it doesn't, undoing it and trying something else. This article explains backtracking using a practical project instead of abstract examples. The Problem Imagine you have several Tetris pieces (tetrominoes), and your goal is to fit all of them into the smallest possible square . It might look something like this: A A A A B B B B C C C C D D D D The challenge is to arrange every piece so that: No pieces overlap. No piece extends outside the board. Every piece is used exactly once. The board is as small as possible. This is much harder than it looks. My First Thought Initially, I thought I could simply place one piece after another. Place A Place B Place C Place D Done! Unfortunately, programming isn't always that kind. Sometimes the first position you choose for piece A makes it impossible to place D later. The mistake wasn't with D . The mistake happened much earlier. Enter Backtracking Backtracking works like this: Place a piece. Try placing the next one. If you get stuck... Remove the last piece. Try a different position. Repeat until every piece fits. It's essentially saying: "If this path doesn't work, let's go back and explore another one." Visualizing the Search Suppose we have four tetrominoes. Start ├── Put A at (0,0) │ ├── Put B │ │ ├── Put C │ │ │ ├── D fits ✅ │ │ │ └── D fails ❌ │ │ └── Try another position │ └── Move A elsewhere └── Try another position for A Every branch represents another possibility. Backtracking explores these branches until it finds one that works. How It Looks in Go The heart of the algorithm is surprisingly small. func solve ( index int ) bool { if index == len ( pieces ) { return true } for every

2026-07-15 原文 →
AI 资讯

Which Is to Be Master? Language, Authority and LLMs

Introduction “When I use a word,” Humpty Dumpty said in rather a scornful tone, “it means just what I choose it to mean—neither more nor less.” “The question is,” said Alice, “whether you can make words mean so many different things.” “The question is,” said Humpty Dumpty, “which is to be master—that's all.” — Lewis Carroll, Through the Looking-Glass Humpty Dumpty believes that words can mean whatever we choose them to mean. Alice asks an interesting question. Can they? Programming and Language Programming languages derive much of their power from formally specified semantics. The language implementation, not the programmer, defines what if , while and return mean. I cannot persuade the compiler that false should be treated as true . The rules establish a shared and mechanically enforced understanding of what a program means. Large Language Models however, do not execute according to fixed semantics. They interpret natural language through context. This distinction has profound consequences and suggests that a language model has no intrinsic notion of authority. In a programming language, when two instructions conflict, the language specification and execution environment determine the outcome. In natural language, authority does not arise from the words alone. It depends on context, convention, identity, and external rules. Language models, by nature, inherit this ambiguity. A prompt is therefore not a program in the traditional sense. It is an attempt to establish the context within which subsequent language should be interpreted. "You are a detective." "Do not reveal the identity of the murderer." "Only answer questions using the evidence you have observed." None of these statements is mechanically enforced merely because it appears in the prompt. They describe a role, a constraint, and an assumed world. The model may follow them, but their authority must be created and protected by systems outside the model. Prompt injection exploits precisely this weakness. It

2026-07-14 原文 →
AI 资讯

The first sunlight reflecting space mirror has been cleared for launch

Reflect Orbital has been given the green light to launch its first space mirror that aims to redirect sunlight down to Earth at night. The US Federal Communications Commission (FCC) has authorized the California-based startup to build and operate a single prototype satellite in low-Earth orbit later this year, despite concerns over how the technology […]

2026-07-14 原文 →
AI 资讯

The Arrhenius Equation: Why a 10-Degree Rise Can Double a Reaction Rate

Leave a carton of milk on the counter and it spoils in a day. Put the same carton in a refrigerator and it lasts a week or more. Nothing about the milk has changed — the same bacteria, the same enzymes, the same chemistry. What changed is temperature, and temperature does not nudge reaction rates gently. It controls them with an exponential lever. A swing of just a few degrees can stretch shelf life from hours to days. This article explains the equation behind that lever — the Arrhenius equation — what each term means physically, how to use it to compare rates at two temperatures, and the mistakes that quietly corrupt activation-energy estimates. Why this calculation matters Almost any process that involves chemistry running over time depends on the temperature-rate relationship. Food spoilage, drug degradation, battery aging, polymer curing, corrosion, and the cracking reactions in a refinery all speed up or slow down with temperature in the same exponential way. Engineers who design accelerated life tests rely on it directly: they run a product hot for weeks to predict how it behaves cold for years. The reason a quantitative model is essential is that intuition fails here. A linear guess — "twice as hot, twice as fast" — is badly wrong. Reaction rate climbs far faster than temperature does, and how much faster depends on the activation energy of the specific reaction. Without the Arrhenius equation you cannot convert an oven-shelf test into a real-world prediction, and you cannot tell whether a 5 C process drift matters or not. The core formula Svante Arrhenius proposed the relationship in 1889, building on earlier work by van 't Hoff. It states that the rate constant k of a reaction depends on temperature as: k = A * exp( -Ea / (R * T) ) Here A is the frequency factor (sometimes called the pre-exponential factor), Ea is the activation energy in J/mol, R is the universal gas constant 8.314 J/mol K, and T is the absolute temperature in kelvin. The physical picture

2026-07-14 原文 →
AI 资讯

Power BI DAX Essential Functions — Explained with Examples

If you’ve ever struggled with CALCULATE() or wondered why SUMX() behaves differently from SUM() , this guide is for you. DAX (Data Analysis Expressions) is the language that powers Power BI , Analysis Services , and Power Pivot — enabling dynamic calculations, filtering, and time intelligence. Below is a categorized cheat sheet of essential DAX functions , plus examples showing how to use each in real-world Power BI scenarios. Filtering & Context These functions control how filters are applied and evaluated in your calculations. Function Example Description CALCULATE() CALCULATE(SUM(Sales[Amount]), Region[Name] = "Nairobi") Changes filter context to calculate total sales for Nairobi. FILTER() FILTER(Sales, Sales[Amount] > 10000) Returns a table filtered by condition. ALL() CALCULATE(SUM(Sales[Amount]), ALL(Region)) Ignores filters on Region. REMOVEFILTERS() CALCULATE(SUM(Sales[Amount]), REMOVEFILTERS(Region)) Removes filters from Region. VALUES() VALUES(Customer[City]) Returns unique list of cities. SELECTEDVALUE() SELECTEDVALUE(Product[Category], "All") Returns selected category or “All” if none. TREATAS() TREATAS(VALUES(Temp[City]), Customer[City]) Applies one table’s values as filters on another. KEEPFILTERS() CALCULATE(SUM(Sales[Amount]), KEEPFILTERS(Product[Category] = "Electronics")) Keeps existing filters and adds new ones. ALLSELECTED() CALCULATE(SUM(Sales[Amount]), ALLSELECTED(Region)) Respects user selections in visuals. ALLEXCEPT() CALCULATE(SUM(Sales[Amount]), ALLEXCEPT(Sales, Sales[Year])) Removes all filters except Year. Aggregation Summarize or aggregate data across rows or columns. Function Example Description SUM() SUM(Sales[Amount]) Adds all sales amounts. AVERAGE() AVERAGE(Sales[Amount]) Calculates mean value. COUNT() COUNT(Customer[ID]) Counts non-blank entries. COUNTROWS() COUNTROWS(Sales) Counts rows in a table. DISTINCTCOUNT() DISTINCTCOUNT(Customer[ID]) Counts unique customers. MIN() MIN(Sales[Amount]) Finds smallest sale. MAX() MAX(Sales[Amo

2026-07-13 原文 →
AI 资讯

Memprediksi Peluang Klub Promosi Bertahan di Liga Top Eropa — Part 1: Kickoff & Rencana

series: Prediksi Survival Klub Debutan Kenapa Project Ini? Setiap musim, klub yang promosi ke liga top (Premier League, La Liga, dst.) menghadapi risiko besar: sekitar 2 dari 3 klub yang naik biasanya kembali terdegradasi di musim pertama mereka. Saya penasaran — bisakah performa di beberapa laga awal musim memberi sinyal dini soal peluang klub tersebut bertahan? Ini jadi project portofolio pertama saya sebagai data scientist yang baru mulai (0-1 tahun pengalaman). Saya sengaja pilih topik yang saya suka (sepak bola) supaya prosesnya tetap enjoyable, bukan cuma "tutorial project" generik. Rencana Project Pertanyaan utama: Berdasarkan performa 8 laga pertama musim debut, seberapa besar peluang klub promosi bertahan hingga musim berikutnya (tidak degradasi)? Data yang dipakai: football-data.co.uk — data hasil pertandingan tiap musim sejak 1993/1994 Wikipedia (halaman musim liga) — daftar klub promosi & klasemen akhir musim Tech stack: pandas , requests untuk data collection scikit-learn untuk modeling (mulai dari Logistic Regression sebagai baseline) imbalanced-learn untuk handle class imbalance Streamlit + Plotly untuk dashboard interaktif Deploy ke Streamlit Community Cloud Timeline (Build in Public) Saya bikin timeline ini publik supaya ada tekanan yang sehat untuk benar-benar menyelesaikannya, bukan cuma jadi ide yang menguap: Checkpoint Target Tanggal Yang Harus Selesai Part 1 (post ini) 11 Juli 2026 Kickoff, rencana, environment siap Part 2 15 Juli 2026 Dataset jadi, push ke GitHub Part 3 17 Juli 2026 EDA selesai, insight awal Part 4 24 Juli 2026 Model final dipilih + evaluasi Part 5 31 Juli 2026 Dashboard live di Streamlit Cloud Part 6 (final) 8 Agustus 2026 Project selesai, recap lengkap Tantangan yang Sudah Saya Antisipasi Data leakage — fitur harus dihitung dari laga awal musim saja, bukan seluruh musim, biar model beneran memprediksi bukan "menyontek" hasil akhir Dataset kecil — kemungkinan hanya ~60-100 sampel klub, jadi saya mulai dari model sederhana (Lo

2026-07-11 原文 →