Recent Posts
Archives

Posts Tagged ‘HadiHariri’

PostHeaderIcon [DevoxxFR2014] 42 IntelliJ IDEA Tips and Tricks in 45 Minutes – A Thorough Examination of Productivity Boosters

Lecturer

Hadi Hariri has built a distinguished career as a Technical Evangelist at JetBrains, where he promotes IntelliJ IDEA and other development tools through presentations, podcasts, and community engagement. With extensive experience in software architecture and web development, he has authored numerous articles and books while contributing to open-source projects. Based in Spain, Hadi balances his professional life with family responsibilities, including raising three sons, and maintains interests in Tennis and technology evangelism.

Abstract

IntelliJ IDEA represents a pinnacle of integrated development environments, offering an extensive array of features designed to enhance developer productivity across the entire software lifecycle. This presentation delivers a fast-paced overview of 42 essential tips and tricks, though in reality incorporating over 100 individual techniques, each carefully selected to address specific challenges in code navigation, completion, refactoring, debugging, and version control. The article provides a detailed analysis of these features, explaining their implementation mechanics, practical applications, and impact on workflow efficiency. Through live demonstrations and step-by-step breakdowns, it shows how mastering these tools can transform daily development tasks from tedious obligations into streamlined processes, ultimately leading to higher quality code and faster delivery.

Navigation Mastery: Moving Through Code with Precision and Speed

Efficient navigation forms the foundation of productive development in IntelliJ IDEA, allowing users to traverse large codebases with minimal cognitive effort. The Recent Files dialog, accessed via Ctrl+E on Windows or Cmd+E on Mac, presents a chronological list of edited files, enabling quick context switching without manual searching. This feature proves particularly valuable in multi-module projects where related files span different directories, as it preserves mental flow during iterative development cycles.

The Navigate to Class command, triggered by Ctrl+N, allows instant location of any class by typing its name with support for camel-case abbreviation, such as “SC” for StringCalculator. This extends to symbols through Ctrl+Alt+Shift+N, encompassing methods, fields, and variables across the project. These capabilities rely on IntelliJ’s sophisticated indexing system, which builds comprehensive symbol tables upon project load, delivering sub-second search results even in repositories exceeding a million lines of code.

The Structure view, opened with Alt+7, offers a hierarchical outline of the current file’s elements, including methods, fields, and nested classes, with incremental search for rapid location. When combined with the File Structure Popup via Ctrl+F12, developers can navigate complex files without diverting attention from the editor window, maintaining focus during intensive coding sessions.

Code Completion and Generation: Intelligent Assistance for Faster Coding

IntelliJ’s completion system transcends basic auto-suggest by incorporating contextual awareness and type inference to propose relevant options. Basic completion, invoked with Ctrl+Space, suggests identifiers based on scope and visibility, while smart completion via Ctrl+Shift+Space filters to match expected types, preventing invalid assignments and reducing debugging time.

Postfix completion introduces a novel way to wrap expressions with common constructs; for instance, typing “.not” after a boolean generates negation logic, while “.for” creates an iteration loop over collections. This feature streamlines frequent patterns, such as null checks with “.nn” or type casting with “.cast”, integrating seamlessly with the editor’s flow.

Live templates automate repetitive structures; the built-in “sout” expands to System.out.println(), while custom templates can generate complete test methods with annotations and assertions. Hadi demonstrates creating a JUnit template that includes setup code, triggered by a user-defined abbreviation for instant productivity gains.

The generate-from-usage feature, activated with Alt+Enter on undefined elements, creates missing methods, fields, or classes on demand. This supports an intentional coding style where developers first express usage intent, then implement details, aligning perfectly with test-driven development methodologies.

Refactoring Tools: Safe Code Transformation at Scale

Refactoring in IntelliJ maintains program semantics while restructuring code for improved readability and maintainability. The rename refactoring, via Shift+F6, updates all references including comments and string literals when enabled, handling scope conflicts intelligently. Extract method (Ctrl+Alt+M) creates functions from selected code blocks, automatically determining parameters and return types based on usage analysis.

Inline refactoring (Ctrl+Alt+N) reverses extractions, useful for simplifying overly fragmented code while preserving behavior. Change signature (Ctrl+F6) modifies method parameters with propagation to callers, inserting default values for new parameters to avoid compilation errors.

Surround with (Ctrl+Alt+T) wraps selected code in control structures like try-catch or if-else, with template support for custom patterns. These tools collectively enable large-scale code reorganization without manual error-prone adjustments.

Debugging Capabilities: Deep Insight into Runtime Behavior

The debugger provides sophisticated inspection beyond basic stepping. Smart step into (Shift+F7) allows selective entry into chained method calls, focusing on relevant code paths. Evaluate expression (Alt+F8) executes arbitrary code in the current frame, supporting complex debugging scenarios like modifying variables mid-execution.

Drop frame rewinds the call stack, re-executing methods without full restart, ideal for iterative testing of logic branches. Conditional breakpoints pause only when expressions evaluate true, filtering irrelevant iterations in loops.

Lambda debugging treats expressions as methods with full variable inspection and stepping. Custom renderers format complex objects, like displaying collections as comma-separated lists.

Version Control Integration: Streamlined Collaboration

Git support includes visual diffs (Ctrl+D) for conflict resolution, branch management through intuitive dialogs, and cherry-picking from commit histories. The changes view lists modified files with diff previews; annotate shows per-line authorship and revisions.

Interactive rebase through the VCS menu simplifies history cleaning by squashing or reordering commits. Pull request workflows integrate with GitHub, displaying comments directly in the editor for contextual review.

Plugin Ecosystem: Extending Functionality

Plugins like Lombok automate boilerplate with annotations, while Key Promoter X teaches shortcuts through notifications. SonarLint integrates code quality checks, flagging issues in real-time.

Custom plugin development uses Java with SDK support for editor extensions and custom tools.

Advanced Configuration for Optimal Performance

Running on Java 8+ (edit info.plist) improves font rendering. The productivity guide tracks feature usage, helping discover underutilized tools.

Conclusion: IntelliJ as Productivity Multiplier

These techniques collectively transform IntelliJ into an indispensable tool that accelerates development while improving code quality. Consistent application leads to substantial time savings and better software outcomes.

Links:

PostHeaderIcon [DevoxxFR2013] Developers: Prima Donnas of the 21st Century? — A Provocative Reflection on Craft, Value, and Responsibility

Lecturer

Hadi Hariri stands at the intersection of technical depth and human insight as a developer, speaker, podcaster, and Technical Evangelist at JetBrains. For over a decade, he has traversed the global conference circuit, challenging audiences to confront uncomfortable truths about their profession. A published author and frequent contributor to developer publications, Hadi brings a rare blend of architectural expertise and communication clarity. Based in Spain with his wife and three sons, he leads the .NET Malaga User Group and holds prestigious titles including ASP.NET MVP and Insider. Yet beneath the credentials lies a relentless advocate for software as a human endeavor — not a technological one.

Abstract

This is not a technical talk. There will be no code, no frameworks, no live demos. Instead, Hadi Hariri delivers a searing, unfiltered indictment of the modern developer psyche. We proclaim ourselves misunderstood geniuses, central to business success yet perpetually underappreciated. We demand the latest tools, resent managerial oversight, and cloak personal ambition in the language of craftsmanship. But what if the real problem is not “them” — it’s us?

Through sharp wit, brutal honesty, and relentless logic, Hadi dismantembles the myths we tell ourselves: that communication is someone else’s job, that innovation resides in syntax, that our discomfort with business priorities justifies disengagement. This session is a mirror — polished, unforgiving, and essential. Leave your ego at the door, or stay seated and miss the point.

The Myth of the Misunderstood Genius

We gather in echo chambers — conferences, forums, internal chat channels — to commiserate about how management fails to grasp our brilliance. We lament that stakeholders cannot appreciate the elegance of our dependency injection, the foresight of our microservices, the purity of our functional paradigm. We position ourselves as the unsung heroes of the digital age, laboring in obscurity while others reap the rewards.

Yet when pressed, we retreat behind JIRA tickets, estimation buffers, and technical debt backlogs. We argue passionately about tabs versus spaces, spend days evaluating build tools, and rewrite perfectly functional systems because the new framework promises salvation. We have mistaken activity for impact, novelty for value, and personal preference for professional necessity.

Communication: The Silent Killer of Influence

The single greatest failure of the developer community is not technical — it is communicative. We speak in acronyms and abstractions: DI, IoC, CQRS, DDD. We present architecture diagrams as if they were self-evident. We say “it can’t be done” when we mean “I haven’t considered the trade-offs.” We fail to ask “why” because we assume the answer is beneath us.

Consider a simple feature request: “The user should be able to reset their password.” A typical response might be: “We’ll need a new microservice, a message queue, and a Redis cache for rate limiting.” The business hears cost, delay, and complexity. What they needed was: “We can implement this securely in two days using the existing authentication flow, with an optional enhancement for audit logging if compliance requires it.”

The difference is not technical sophistication — it is empathy, clarity, and alignment. Until we learn to speak the language of outcomes rather than implementations, we will remain marginalized.

The Silver Bullet Delusion

Every year brings a new savior: a framework that will eliminate boilerplate, a methodology that will banish chaos, a cloud service that will scale infinitely. We chase these mirages with religious fervor, abandoning yesterday’s solution before it has proven its worth. We rewrite backend systems in Node.js, then Go, then Rust — not because the business demanded it, but because we read a blog post.

This is not innovation. It is distraction. It is the technical equivalent of rearranging deck chairs on the Titanic. The problems that truly matter — unclear requirements, legacy constraints, human error, organizational inertia — are immune to syntax. No process can compensate for poor judgment, and no tool can replace clear thinking.

Value Over Vanity: Redefining Success

We measure ourselves by metrics that feel good but deliver nothing: lines of code written, test coverage percentages, build times in milliseconds. We celebrate the deployment of a new caching layer while users wait longer for search results. We optimize the developer experience at the expense of the user experience.

True value resides in outcomes: a feature that increases revenue, a bug fix that prevents customer churn, a performance improvement that saves server costs. These are not glamorous. They do not trend on Hacker News. But they are the reason our profession exists.

Ask yourself with every commit: Does this make someone’s life easier? Does it solve a real problem? If400 If the answer is no, you are not innovating — you are indulging.

The Privilege We Refuse to Acknowledge

Most professions are defined by repetition. The accountant reconciles ledgers. The lawyer drafts contracts. The mechanic replaces brakes. Day after day, the same patterns, the same outcomes, the same constraints.

We, by contrast, are paid to solve novel problems. We are challenged to learn continuously, to adapt to shifting requirements, to create systems that impact millions. We work in air-conditioned offices, collaborate with brilliant minds, and enjoy flexibility that others can only dream of. We are not underpaid or underappreciated — we are extraordinarily privileged.

And yet we complain. We demand ping-pong tables and unlimited vacation while nurses work double shifts, teachers buy school supplies out of pocket, and delivery drivers navigate traffic in the rain. Our discomfort is not oppression — it is entitlement.

Innovation as Human Impact

Innovation is not a technology. It is not a framework, a language, or a cloud provider. Innovation is the act of making someone’s life better. It is the medical system that detects cancer earlier. It is the banking app that prevents fraud. It is the e-commerce platform that helps a small business reach new customers.

Even in enterprise software — often derided as mundane — we have the power to reduce frustration, automate drudgery, and free human attention for higher purposes. Every line of code is an opportunity to serve.

A Call to Maturity

The prima donnas of the 21st century are not the executives demanding impossible deadlines. They are not the product managers changing requirements. They are us — the developers who believe our discomfort entitles us to disengagement, who confuse technical preference with professional obligation, who prioritize our learning over the user’s needs.

It is time to grow up. To communicate clearly. To focus on outcomes. To recognize our privilege and wield it responsibly. The world does not owe us appreciation — it owes us the opportunity to make a difference. Let us stop wasting it.

Links

PostHeaderIcon [DevoxxBE2012] Putting Kotlin to the Test

During DevoxxBE2012, Hadi Hariri, a developer and technical evangelist at JetBrains, presented an in-depth evaluation of Kotlin, a then-emerging programming language designed by his company. Hadi, with his background in software architecture and web development, aimed to assess whether Kotlin could address common pitfalls in existing languages while serving as a versatile tool for various development needs. He began by providing context on Kotlin’s origins, noting its static typing, object-oriented nature, and targets for JVM bytecode and JavaScript compilation. Licensed under Apache 2.0, it was at milestone M3, with expectations for further releases leading to beta.

Hadi explained the motivation behind Kotlin: after years of building IDEs in Java, JetBrains sought a more efficient alternative without the complexities of languages like Scala. He highlighted Kotlin’s focus on practicality, aiming to reduce boilerplate and enhance productivity. Through live coding, Hadi demonstrated building a real-world application, showcasing how Kotlin simplifies syntax and integrates seamlessly with Java.

One key aspect was Kotlin’s concise class definitions, where properties and constructors merge into a single line, eliminating redundant getters and setters. Hadi illustrated this with examples, contrasting it with verbose Java equivalents. He also touched on null safety, where the language enforces checks to prevent null pointer exceptions, a frequent issue in other systems.

As the session progressed, Hadi explored functional programming elements, such as higher-order functions and lambdas, which allow for expressive code without excessive ceremony. He built components of an application, like data models and services, to test interoperability and performance.

Syntax Innovations and Productivity Gains

Hadi delved into Kotlin’s syntax, emphasizing features like extension functions that add methods to existing classes without inheritance. This promotes cleaner code and reusability. He showed how to extend standard library classes, making operations more intuitive.

Data classes were another highlight, automatically providing equals, hashCode, and toString methods, ideal for immutable objects. Hadi used these in his demo app to handle entities efficiently.

Pattern matching via ‘when’ expressions offered a more powerful alternative to switch statements, supporting complex conditions. Hadi integrated this into control flows, demonstrating reduced branching logic.

Smart casts automatically handle type checks, minimizing explicit casts. In his application, this streamlined interactions with mixed-type collections.

Interoperability and Platform Targets

A core strength, as Hadi pointed out, is Kotlin’s full compatibility with Java. Code can call Java libraries directly, and vice versa, facilitating gradual adoption. He compiled mixed projects, showing no performance overhead.

Targeting JavaScript, Kotlin compiles to efficient code for web fronts, sharing logic between server and client. Hadi previewed this, noting potential for unified development stacks.

He addressed modules and versioning, still in progress, but promising better organization than Java packages.

Functional and Advanced Constructs

Hadi introduced traits, similar to interfaces but with implementations, enabling mixin-like behavior. He used them to compose behaviors in his app.

Delegated properties handled lazy initialization and observables, useful for UI bindings or caching.

Coroutines, though nascent, hinted at simplified asynchronous programming.

In Q&A, Hadi clarified comparisons to Ceylon and Scala, noting Kotlin’s balance of comprehensibility and power. He discussed potential .NET targeting, driven by demand.

Real-World Application Demo

Throughout, Hadi built a sample app, testing features in context. He covered error handling, collections, and concurrency, proving Kotlin’s robustness.

He encouraged trying Kotlin via IntelliJ’s community edition, which supports it natively.

Hadi’s presentation positioned Kotlin as a promising contender, fixing expensive language flaws while maintaining industrial applicability.

Links: