<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/rss-styles.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Stefan Cosma</title><description>Lead Frontend Developer. Writing about frontend architecture, design systems, and the craft of building great web experiences.</description><link>https://stefancosma.xyz/</link><atom:link href="https://stefancosma.xyz/rss" rel="self" type="application/rss+xml"/><language>en-us</language><lastBuildDate>Fri, 29 May 2026 15:32:01 GMT</lastBuildDate><ttl>60</ttl><image><url>https://stefancosma.xyz/web-app-manifest-192x192.png</url><title>Stefan Cosma</title><link>https://stefancosma.xyz</link></image><managingEditor>hello@stefancosma.xyz (Stefan Cosma)</managingEditor><item><title>The Shifting Value of Frontend Engineering</title><link>https://stefancosma.xyz/2026/05/21/the-shifting-value-of-frontend-engineering</link><guid isPermaLink="true">https://stefancosma.xyz/2026/05/21/the-shifting-value-of-frontend-engineering</guid><description>AI isn’t taking our jobs, but it is radically shifting where our value lies. Typing speed was never the bottleneck—knowing what to build is. While tools handle the boilerplate, the real craft of frontend in 2026 is rooted in architecture, human empathy, and making good technical decisions.</description><pubDate>Thu, 21 May 2026 10:37:00 GMT</pubDate><content:encoded>&lt;p&gt;It is mid-2026, and if your social media feeds look anything like mine, you have probably seen some variation of the &amp;quot;AI is replacing developers&amp;quot; doom-posting. But if you actually spend your days building complex web applications, you know the reality on the ground is completely different.&lt;/p&gt;
&lt;p&gt;The relationship between frontend engineering and artificial intelligence has settled into a pragmatic rhythm. AI isn&amp;#39;t taking our jobs, but it &lt;em&gt;is&lt;/em&gt; radically shifting where our value lies as engineers.&lt;/p&gt;
&lt;p&gt;I recently came across an excellent visual breakdown that captures this exact dynamic perfectly:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;┌───────────────────────────────────────┬───────────────────────────────────────┐
│             AI IS GREAT FOR           │           STILL VERY HUMAN            │
├───────────────────────────────────────┼───────────────────────────────────────┤
│ • Boilerplate &amp;amp; Setup                 │ • Messy business logic                │
│ • UI scaffolding (MUI, Tailwind, etc.)│ • Unclear or moving requirements      │
│ • Straightforward refactors           │ • Scaling frontend architecture       │
│ • Writing unit and integration tests  │ • Hunting down performance bottlenecks│
│ • Generating basic documentation      │ • Making complex UX feel simple       │
│ • Debugging obvious syntax errors     │ • Navigating real business context    │
└───────────────────────────────────────┴───────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The takeaway here is incredibly clear: &lt;strong&gt;The value of a frontend engineer is shifting from writing code fast to making good technical decisions.&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;The Automatable Stuff&lt;/h3&gt;
&lt;p&gt;Let’s be honest: nobody actually enjoys writing mundane boilerplate.&lt;/p&gt;
&lt;p&gt;If I need a quick component structure, a standard form setup using Formik, or some repetitive TypeScript interface definitions, handing that off to an AI model is a massive time-saver. It’s excellent at scaffolded layouts and churning out the first draft of unit tests.&lt;/p&gt;
&lt;p&gt;But generating lines of code has always been the easiest part of our industry. Typing speed was never the bottleneck in software engineering. The real challenge has always been knowing &lt;em&gt;what&lt;/em&gt; to type, and more importantly, &lt;em&gt;why&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;Where the AI Hits a Wall&lt;/h3&gt;
&lt;p&gt;Where the algorithms completely fumble is where the actual engineering begins.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Real Business Context &amp;amp; Messy Logic:&lt;/strong&gt; Software doesn&amp;#39;t live in a vacuum. It lives in a complex ecosystem of legacy code, specific company goals, and deeply nested logic that cannot be neatly summarized in a prompt. AI doesn&amp;#39;t know why your API returns a mutated data structure because of a legacy backend decision made five years ago; you do.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scaling Architecture:&lt;/strong&gt; Deciding how to structure a large-scale frontend, how to manage state across a massive monorepo, or how to design a resilient system that a team of twenty developers can contribute to without breaking things—that requires architectural vision. It requires empathy for the team and an understanding of longevity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Empathy of UX:&lt;/strong&gt; A machine can build a functional interface based on a design system. But it doesn&amp;#39;t understand the friction a human feels when navigating a complex workflow. Making the complex feel simple is an art form rooted entirely in human empathy.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;The True Craft of Frontend&lt;/h3&gt;
&lt;p&gt;If you are just getting into web development, or if you are a senior engineer trying to find your footing in this new landscape, do not panic about the sheer volume of code AI can generate.&lt;/p&gt;
&lt;p&gt;Instead, lean into the craft. Focus on understanding design patterns, performance optimization, system design, and communication. The ability to sit down with stakeholders, decode vague, conflicting requirements, and translate them into a stable technical blueprint is the most valuable skill you can possess.&lt;/p&gt;
&lt;p&gt;AI is a fantastic co-pilot for the tedious bits. But the architecture, the decisions, and the soul of the application? That is still very human.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;What are your thoughts? Have you noticed your daily developer workflow shifting away from raw coding and more toward system design lately? Let&amp;#39;s talk about it.&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>architecture</category><category>ai</category><category>frontend</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/1779361760008-Gemini_Generated_Image_7xb3ej7xb3ej7xb3.png" length="0" type="image/png"/></item><item><title>Why I ditched traditional CMS platforms for a custom-built stack</title><link>https://stefancosma.xyz/2026/04/28/why-i-ditched-traditional-cms-platforms-for-a-custom-built-stack</link><guid isPermaLink="true">https://stefancosma.xyz/2026/04/28/why-i-ditched-traditional-cms-platforms-for-a-custom-built-stack</guid><description>I rebuilt my blog to escape the limits of traditional CMS platforms. This post breaks down a high-performance stack using Astro SSR, Vercel, and Cloudflare, plus an automated pipeline that uses Supabase Edge Functions and Resend to blast newsletters the moment I hit publish.</description><pubDate>Tue, 28 Apr 2026 12:03:00 GMT</pubDate><content:encoded>&lt;p&gt;Just as the title implies, this post covers what it takes to move away from rigid, off-the-shelf CMS solutions in favor of a bespoke architecture. I wanted a setup that combined the speed of a static site with the power of a modern cloud infrastructure. To do this, I landed on a stack featuring Astro, Vercel, Cloudflare, and Supabase, with Resend handling the communication layer.&lt;/p&gt;
&lt;h2&gt;The Frontend: Performance-First with Astro&lt;/h2&gt;
&lt;p&gt;The core of the site is built on Astro, which I chose for its &amp;quot;zero-JS by default&amp;quot; footprint. While many modern frameworks ship megabytes of JavaScript for a simple blog, Astro lets me keep the frontend lean.&lt;/p&gt;
&lt;p&gt;However, I didn&amp;#39;t want a purely static site that requires a full rebuild every time I fix a typo. I’m utilizing Astro SSR (Server-Side Rendering) to fetch content dynamically. This gives me the best of both worlds: the SEO benefits of a static site with the real-time flexibility of a database-backed application. Everything is built using TypeScript and React, styled with Tailwind CSS, and kept clean using Biome for linting and formatting.&lt;/p&gt;
&lt;h2&gt;The Infrastructure: Cloudflare &amp;amp; Vercel&lt;/h2&gt;
&lt;p&gt;For the plumbing, I’m pushing my code to GitHub, which triggers an automatic deployment to Vercel. Vercel handles the SSR logic and global distribution perfectly, but I&amp;#39;ve also layered Cloudflare on top.&lt;/p&gt;
&lt;p&gt;Cloudflare acts as the primary gateway, handling DNS and providing an extra layer of caching and security. By having Cloudflare sit in front of Vercel, I have granular control over how traffic hits the site and an added layer of protection against the usual web noise.&lt;/p&gt;
&lt;h2&gt;The Content Engine: Custom CMS &amp;amp; Supabase&lt;/h2&gt;
&lt;p&gt;To manage the blog, I built a Custom CMS with its own admin interface. Instead of being locked into a specific CMS provider&amp;#39;s UI or API, I handle the full CRUD lifecycle myself.&lt;/p&gt;
&lt;p&gt;The CMS communicates with Supabase, which acts as my database and authentication provider. When I save a post, the data is stored in my tables and instantly becomes available for the Astro frontend to fetch via SSR. It’s a seamless flow that keeps me in total control of my data schema.&lt;/p&gt;
&lt;h2&gt;Automating the Newsletter with Edge Functions&lt;/h2&gt;
&lt;p&gt;The part of this project I’m most excited about is the automated notification system. I wanted a way to notify subscribers the second a new post goes live without any manual intervention.&lt;/p&gt;
&lt;p&gt;The logic follows a clean, event-driven pipeline:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Trigger: A new row is inserted into the posts table.&lt;/li&gt;
&lt;li&gt;Webhook: Supabase detects the change and triggers a webhook.&lt;/li&gt;
&lt;li&gt;Process: The webhook calls a Supabase Edge Function.&lt;/li&gt;
&lt;li&gt;Broadcast: The function hits the Resend API, which sends a templated email to my &amp;quot;General Segment&amp;quot; of subscribers.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Final Thoughts&lt;/h2&gt;
&lt;p&gt;This rebuild wasn&amp;#39;t just about changing where my text is stored; it was about building a cohesive system where the frontend, backend, and delivery layers work in sync. I applied the same logic to my contact page, using Resend with Audience Segments to ensure messages are categorized and formatted before they even hit my inbox.&lt;/p&gt;
&lt;p&gt;This setup gives me total control over my content pipeline while keeping the user experience fast and accessible. If you&amp;#39;re looking to move beyond a basic WordPress or Ghost setup, building your own stack is a challenge worth taking.&lt;/p&gt;
&lt;p&gt;If you have any ideas on how to further optimize this infrastructure, let me know. You can reach me on most social media channels!&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>cms</category><category>astro</category><category>vercel</category><category>supabase</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/1777379544974-Gemini_Generated_Image_llmroollmroollmr__1_.png" length="0" type="image/png"/></item><item><title>Beyond the Code: What I Learned Contributing to Zed’s Open Source</title><link>https://stefancosma.xyz/2026/04/02/beyond-the-code-what-i-learned-contributing-to-zeds-open-source</link><guid isPermaLink="true">https://stefancosma.xyz/2026/04/02/beyond-the-code-what-i-learned-contributing-to-zeds-open-source</guid><description>Make the tools you need if the ones you have don&apos;t work. I care a lot about my development environment, and switching to the Zed editor was the perfect reason to stop waiting for features and start helping out.</description><pubDate>Thu, 02 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;If you’ve been following my work, you know I’m a bit of a stickler for my development environment. Whether it&amp;#39;s &lt;a href=&quot;/2020/05/29/cleaning-up-plex-with-google-scripts/&quot;&gt;automating Plex with Google Scripts&lt;/a&gt; or fine-tuning my terminal, I firmly believe the tools we use should work for us, not the other way around.&lt;/p&gt;
&lt;p&gt;Recently, I’ve been spending a lot of time in &lt;strong&gt;Zed&lt;/strong&gt;. If you haven&amp;#39;t tried it yet, it’s a high-performance code editor built from the ground up in Rust. It feels incredibly snappy because it renders everything on the GPU at a synchronized 120 FPS—basically, it handles your code with the same fluid precision a modern video game handles graphics.&lt;/p&gt;
&lt;p&gt;But moving to a new editor often means leaving behind the little things that make a workspace feel like &amp;quot;home.&amp;quot; Instead of waiting for someone else to build what I needed, I decided to scratch my own itch. I’ve recently released two extensions: &lt;strong&gt;Relaxed Zed Theme&lt;/strong&gt; and &lt;strong&gt;Loupe Zed&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Why Open Source Matters (Beyond the Code)&lt;/h2&gt;
&lt;p&gt;Contributing to open source is often framed as &amp;quot;giving back,&amp;quot; which is true, but it’s also one of the best ways to grow as a developer. When I started working on these extensions, I wasn&amp;#39;t just writing JSON or Rust; I was learning the internals of how a modern, high-performance editor manages buffers, themes, and sandboxing.&lt;/p&gt;
&lt;p&gt;When you submit a Pull Request to a project like Zed, your code is vetted for performance and security. This kind of peer review is a professional &amp;quot;cheat code.&amp;quot; Plus, there is a certain psychological reward in knowing that a tool you created to solve your own eye strain is now helping thousands of other developers stay focused.&lt;/p&gt;
&lt;h2&gt;Porting a Classic: The Relaxed Zed Theme&lt;/h2&gt;
&lt;p&gt;My first project was porting the &lt;strong&gt;Relaxed&lt;/strong&gt; theme. Originally created by Michael Kühnel for VS Code, it uses muted, warm tones on a deep grey background to reduce eye strain during long sessions.&lt;/p&gt;
&lt;p&gt;The technical challenge here was mapping the original TextMate-based scopes to Zed’s theme schema. Zed uses &lt;strong&gt;Tree-sitter&lt;/strong&gt; for parsing, which is much more precise than the old regex-based systems we&amp;#39;re used to in other editors.&lt;/p&gt;
&lt;p&gt;Every Zed extension starts with an &lt;code&gt;extension.toml&lt;/code&gt;. Here is the manifest for the theme:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-TOML&quot;&gt;id = &amp;quot;relaxed-theme&amp;quot;
name = &amp;quot;Relaxed&amp;quot;
version = &amp;quot;0.1.0&amp;quot;
schema_version = 1
authors = [&amp;quot;Stefan Cosma &amp;lt;hi@stefancosma.xyz&amp;gt;&amp;quot;]
description = &amp;quot;A port of the Relaxed VS Code theme. Dark theme with easy on the eyes colors.&amp;quot;
repository = &amp;quot;https://github.com/stefanbc/relaxed-theme-zed&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The heart of the theme is the color palette. I spent a lot of time ensuring the hex codes matched the &amp;quot;relaxed&amp;quot; feel.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/565626532-fecc243d-17f9-4552-b0b8-5a1b1b439ad2.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h2&gt;Precision Tooling: Loupe Zed&lt;/h2&gt;
&lt;p&gt;After the theme, I wanted something more functional. &lt;strong&gt;Loupe&lt;/strong&gt; is a utility that shows the latest available version of your dependencies as &lt;strong&gt;inlay hints&lt;/strong&gt;. It currently supports &lt;code&gt;package.json&lt;/code&gt; (npm), &lt;code&gt;composer.json&lt;/code&gt; (Packagist), and &lt;code&gt;pyproject.toml&lt;/code&gt; (PyPI/Poetry).&lt;/p&gt;
&lt;h3&gt;Performance &amp;amp; Security&lt;/h3&gt;
&lt;p&gt;Zed extensions are sandboxed using &lt;strong&gt;WebAssembly (WASM)&lt;/strong&gt;. This keeps Loupe isolated and incredibly fast. To keep it from being a resource hog, I implemented a TTL cache:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Auto-refresh:&lt;/strong&gt; Versions are cached for 5 minutes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Manual override:&lt;/strong&gt; Just &lt;strong&gt;save the file&lt;/strong&gt; to force an immediate refresh.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Built for the Community&lt;/h3&gt;
&lt;p&gt;I kept the architecture modular. If you want to add a new registry (like Crates.io), you just implement the &lt;code&gt;RegistryHandler&lt;/code&gt; interface. You don&amp;#39;t need to touch the core LSP wiring.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Inlay hints are off by default. Enable them in your settings (&lt;code&gt;cmd+,&lt;/code&gt;):&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre&gt;&lt;code class=&quot;language-JSON&quot;&gt;{ 
  &amp;quot;inlay_hints&amp;quot;: { 
    &amp;quot;enabled&amp;quot;: true 
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Just Start Somewhere&lt;/h2&gt;
&lt;p&gt;If you’re on the fence about contributing, my advice is to start with something visual. A theme or a simple set of snippets is a great way to learn the packaging and distribution process without getting bogged down in complex logic.&lt;/p&gt;
&lt;p&gt;Open source isn&amp;#39;t just for the &amp;quot;elite&amp;quot; developers; it’s for anyone who wants their tools to be 1% better tomorrow than they are today.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Check them out on GitHub:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/stefanbc/relaxed-zed-theme&quot;&gt;Relaxed Zed Theme&lt;/a&gt; - &lt;a href=&quot;https://zed.dev/extensions/relaxed-theme&quot;&gt;Zed Store&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/stefanbc/loupe-zed&quot;&gt;Loupe Zed&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have any questions or ideas on how to improve these, let me know. You can reach me on most social media channels!&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>open-source</category><category>zed</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/photo-1652111865960-15f4a46a7688.jpg" length="0" type="image/jpeg"/></item><item><title>The YAGNI principle, as explained by AI.</title><link>https://stefancosma.xyz/2023/02/23/yagni-principle-explained-ai</link><guid isPermaLink="true">https://stefancosma.xyz/2023/02/23/yagni-principle-explained-ai</guid><description>The YAGNI principle encourages programmers to only implement features necessary for the current iteration of a project. Focusing on the MVP can reduce complexity, technical debt, and make code easier to maintain and refactor.</description><pubDate>Thu, 23 Feb 2023 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;The bellow article is an experiment. It was written entirely by an AI to better understand the capabilities, comprehension of user inputs and reliability of current AI language models. Enjoy!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When it comes to software development, it&amp;#39;s common for developers to overthink and over-engineer their code. However, sometimes less is more. That&amp;#39;s where the YAGNI principle comes in. In this article, we&amp;#39;ll take a closer look at what YAGNI is, how it can be applied in JavaScript development, and why it&amp;#39;s an essential principle for writing clean, efficient, and effective code.&lt;/p&gt;
&lt;h3&gt;What is the YAGNI Principle?&lt;/h3&gt;
&lt;p&gt;The YAGNI principle is a development principle that encourages developers to only implement features or functionality that are essential to the application&amp;#39;s current requirements. In other words, if a feature or functionality is not currently required, there&amp;#39;s no need to implement it because, &amp;quot;You Ain&amp;#39;t Gonna Need It.&amp;quot; YAGNI is closely related to the KISS (Keep It Simple, Stupid) principle, which advocates for simplicity and clarity in code over complexity and cleverness.&lt;/p&gt;
&lt;h3&gt;How YAGNI can be applied in JavaScript?&lt;/h3&gt;
&lt;p&gt;The YAGNI principle can be applied in every stage of the software development process, from planning and design to implementation and testing. In practice, this means developers should only implement the features that are necessary to meet the current requirements of the application. This allows developers to avoid overcomplicating their codebase with unnecessary or premature functionality.&lt;/p&gt;
&lt;p&gt;To see YAGNI in action, let&amp;#39;s consider an example. Suppose we&amp;#39;re building a simple web application that allows users to register and login. Here&amp;#39;s some code that violates the YAGNI principle:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/ray-so-export--2-.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;In this example, we have a &lt;code&gt;User&lt;/code&gt; class with a large number of fields and methods, many of which may not be needed in the current version of the application. For example, &lt;code&gt;isDeleted&lt;/code&gt; and &lt;code&gt;updateProfile&lt;/code&gt; may not be essential at this stage of development. The result is an overly complex and difficult to maintain codebase.&lt;/p&gt;
&lt;p&gt;A better implementation of the &lt;code&gt;User&lt;/code&gt; class would be to only include the essential fields and methods required for the current version of the application. Here&amp;#39;s a YAGNI-compliant implementation of the &lt;code&gt;User&lt;/code&gt; class:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/ray-so-export--3-.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;In this implementation, we only include the fields and methods that are necessary for registering, logging in, and logging out users. This results in a simpler, more maintainable codebase that&amp;#39;s easier to read and understand.&lt;/p&gt;
&lt;p&gt;The YAGNI principle is an essential development principle for writing clean, efficient, and effective code. By only implementing the features and functionality that are essential for the current requirements of the application, developers can avoid overcomplicating their codebase with unnecessary or premature functionality. By applying YAGNI in JavaScript development, developers can create a simpler, more maintainable codebase that&amp;#39;s easier to read and understand.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;As we can see in the above text, the AI managed to do a pretty good job in explaining the YAGNI concept, but as any good AI language model that uses advanced machine learning algorithms, it needs a really good input so that it can return the most accurate result. With that in mind, these &amp;quot;magical&amp;quot; tools that popped up on everyones radar, since Nov 2022, are becoming increasingly better at understanding user inputs and generating the appropriate responses.&lt;/p&gt;
&lt;p&gt;What are your thoughts on the matter? I would love to hear them.&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>ai</category><category>ml</category><category>robots</category><category>singularity</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/photo-1563396983906-b3795482a59a.jpg" length="0" type="image/jpeg"/></item><item><title>How To: Interview a developer, as a developer!</title><link>https://stefancosma.xyz/2022/11/10/how-to-interview-a-developer-as-a-developer</link><guid isPermaLink="true">https://stefancosma.xyz/2022/11/10/how-to-interview-a-developer-as-a-developer</guid><description>This article goes over a simple approach of interviewing a developer, as a developer.</description><pubDate>Thu, 10 Nov 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;Author note: This article focuses on the interview process for a Frontend position and was inspired by a post, I interacted with, on LinkedIn.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You now have a new responsibility within your company. The HR/Recruiting department needs your help in assessing candidates, for a technical position. Luckily they&amp;#39;ve come to the right person because they know you have the soft skills and technical expertise to do just that.&lt;/p&gt;
&lt;p&gt;But you, a senior developer, know nothing about interviewing other developers. Fortunately, for you, there are several resources on the web that can help you with that. From using &lt;a href=&quot;https://www.codinginterview.com/&quot;&gt;CodingInterview.com&lt;/a&gt; as a basis for your interview or requiring that the candidates finish a certain challenge on &lt;a href=&quot;https://leetcode.com/&quot;&gt;LeetCode.com&lt;/a&gt;, there are multiple ways you can create your process of assessment. You could even use this &lt;a href=&quot;https://t3-tools.notion.site/Technical-Interview-Dan-Abramov-9aa6d8e9292e4bd1ae67b44aeeaabf88&quot;&gt;great article&lt;/a&gt; as a starting point.&lt;/p&gt;
&lt;p&gt;Of course, if you work in a big tech company there is a procedure for coding interviews. Still if you work for a small company then most probably that procedure is missing and you have to help the Recruiting department implement it.&lt;/p&gt;
&lt;h2&gt;My approach&lt;/h2&gt;
&lt;p&gt;Below is my process, for assessing the knowledge of a candidate. I have &amp;quot;perfected&amp;quot; this approach throughout many many interviews.&lt;/p&gt;
&lt;p&gt;Since I&amp;#39;m not interested in the recruitment part, I assume that the candidate has already been screened by the Recruiting department, so depending on the time allotted for the technical interview, I structure the discussion so that it does not exceed more than 1 hour. I receive in advance a resume and hopefully a public Github or some VCS, to look over some code written by the candidate.&lt;/p&gt;
&lt;p&gt;If the person is of Senior level, then it is more a technical discussion rather than a coding interview. So far, from what I have experienced, a Senior level candidate not knowing what they are talking about has never happened, but it doesn&amp;#39;t mean it will never happen.&lt;/p&gt;
&lt;p&gt;If they are of Junior or Regular level, then the coding interview process begins.&lt;/p&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;I use Notion (which is a great tool by the way), where I have the whole process structured on several pages. This includes a database for evaluation (I don&amp;#39;t store any personal data, I score the candidate from 1 to 5, set a skill level, type of focus: Frontend, Backend, FullStack, and finally some notes), technical questions for different programming languages (usually JavaScript and PHP), frameworks and lastly coding challenges that help me in determining the candidate&amp;#39;s ability to solve a problem or if they can explain a particular solution.&lt;/p&gt;
&lt;h3&gt;Process&lt;/h3&gt;
&lt;p&gt;The whole discussion is very informal. I start by asking the candidate what tools, frameworks, and libraries they use and what they prefer to focus more on: frontend or backend. I ask these things so that I can get an idea of ​​what the person knows, not what is written in the resume, since we all know that resumes are sometimes bloated and because I want to know if the person might be a good fit with one or more of the ongoing projects within the company.&lt;/p&gt;
&lt;p&gt;As I mentioned at the beginning of the article, the interview is for a Frontend position, so depending on the above answers, I either start with basic JavaScript questions, and depending on the resume we go through questions about Angular / Vue / React, move on to CSS, or start with questions about PHP, databases, and OOP. Finally, I ask about a VCS, usually about Git.&lt;/p&gt;
&lt;p&gt;Here is an example of a fundamental JavaScript question I usually ask in interviews:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/JavaScript.js--1-.png&quot; alt=&quot;&quot;&gt;
&lt;em&gt;Basic JavaScript question&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Another question I could ask is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the difference between undefined and not defined in JavaScript?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here is a &lt;a href=&quot;https://itnext.io/the-difference-between-undefined-and-not-defined-in-javascript-db4c79949be6&quot;&gt;great article&lt;/a&gt; explaining this.&lt;/p&gt;
&lt;p&gt;If I can&amp;#39;t form an educated opinion about the candidate, since the above questions were language focused, I can switch to more agnostic things like Data Structures or Algorithms. Depending on the candidate&amp;#39;s skill level I could also ask about stuff like Hoisting, Closures, or &lt;a href=&quot;https://dev.to/denisveleaev/5-solid-principles-with-javascript-how-to-make-your-code-solid-1kl5&quot;&gt;SOLID&lt;/a&gt;. If they focus more on the Backend, then I could be asking about stuff like Singletons, Prototypes, or even deadlocks.&lt;/p&gt;
&lt;p&gt;The above was more theoretical, now I move on to ask practical code questions.&lt;/p&gt;
&lt;p&gt;I start by showing the candidate a piece of code and ask them to solve a certain problem for me, and I make sure to mention that they can write pseudocode, because I&amp;#39;m more interested in assessing analogical reasoning, problem-solving rather than exact code, my reason being that the time allotted for the interview might not permit it and also:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Remember - the goal isn&amp;#39;t to see how fast they write the right answer. I&amp;#39;m trying to learn about how they work and communicate.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here is an example of a problem I would be asking, in an interview:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/JavaScript.js--2-.png&quot; alt=&quot;&quot;&gt;
&lt;em&gt;Practical code problem&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;If they know how to solve the above problem, then it&amp;#39;s all good, if not, I propose several solutions and ask them to explain how they work. This will allow me to understand their &amp;quot;train of thought&amp;quot; from start to end.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;If the candidate doesn&amp;#39;t know about a certain paradigm/concept or how to solve a practical problem, I try to briefly explain it, if the time allows it. I do this because the person is already stressed and I try to leave them with more knowledge than they came in with.&lt;/p&gt;
&lt;p&gt;If there is still a need after the coding interview session, I have prepared some homework, for example: develop a small app with whatever frameworks, or libraries they want, put it on a public VCS, &lt;a href=&quot;https://codesandbox.io/&quot;&gt;CodeSandbox&lt;/a&gt;, or &lt;a href=&quot;https://stackblitz.com/&quot;&gt;StackBlitz&lt;/a&gt; so that I can evaluate it and see that it works correctly.&lt;/p&gt;
&lt;p&gt;After the interview session is over, I provide feedback to the recruiter in a short, concise email, that covers all the assessed points.&lt;/p&gt;
&lt;p&gt;This is my interview process. I know it&amp;#39;s not perfect but so far it seems it got the job done and I helped in hiring some great developers. Please feel free to point out any flaws you might see in this approach or if you have any feedback you can find me at &lt;a href=&quot;https://twitter.com/stefanbc&quot;&gt;@stefanbc&lt;/a&gt;.&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>how-to</category><category>interview</category><category>developers</category><category>coding</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/photo-1487017159836-4e23ece2e4cf.jpg" length="0" type="image/jpeg"/></item><item><title>How To: Clean up Plex with Google Scripts</title><link>https://stefancosma.xyz/2020/05/29/cleaning-up-plex-with-google-scripts</link><guid isPermaLink="true">https://stefancosma.xyz/2020/05/29/cleaning-up-plex-with-google-scripts</guid><description>Just as the title implies, this tutorial is going to cover what it takes to automatically cleanup a Plex media server, using Google Scripts. I am aware there are other ways to do this, but this tutorial is tailored specifically for Google Scripts.</description><pubDate>Fri, 29 May 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Just as the title implies, this tutorial is going to cover what it takes to automatically cleanup a Plex media server, using Google Scripts. I am aware there are other ways to do this, but this tutorial is tailored specifically for Google Scripts.&lt;/p&gt;
&lt;p&gt;Table of contents&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#setup&quot;&gt;Setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#code&quot;&gt;Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#execution&quot;&gt;Execution&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#notifications&quot;&gt;Notifications&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Setup&lt;/h2&gt;
&lt;p&gt;Head over to the &lt;a href=&quot;https://script.google.com/&quot;&gt;Google Script dashboard&lt;/a&gt; and create a new project. Before we start writing any piece of code we need some prerequisites, for our project.&lt;/p&gt;
&lt;p&gt;Open the &lt;strong&gt;View&lt;/strong&gt; menu and click on &lt;strong&gt;Show manifest file&lt;/strong&gt;. This will allow us to add dependencies and other scripts to our project. Now you can open the &lt;strong&gt;appscript.json&lt;/strong&gt; file and add this line before the last &lt;strong&gt;}&lt;/strong&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;&amp;quot;oauthScopes&amp;quot;: [&amp;quot;https://www.googleapis.com/auth/script.external_request&amp;quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This line gives us the ability to make external requests from our script to the Plex media server.&lt;/p&gt;
&lt;p&gt;After adding the line above, open the &lt;strong&gt;File&lt;/strong&gt; menu and click on &lt;strong&gt;Project properties&lt;/strong&gt; and open the &lt;strong&gt;Script properties&lt;/strong&gt; tab. You will need to add multiple key/value properties.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;TOKEN&lt;/li&gt;
&lt;li&gt;BASE_URL&lt;/li&gt;
&lt;li&gt;IFTTT_WEBHOOK&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The last one is optional and we will cover it in the last point of this tutorial.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll start with number 2, which represents the Plex media server base URL. The server needs to be accessible via the Internet or else our script won&amp;#39;t work at all. For point number 1 you&amp;#39;ll need to do a bit of digging.&lt;/p&gt;
&lt;p&gt;In Plex, open the page of any piece of media (this represents the last child of that media, whether it&amp;#39;s a show or a movie). Next to the Edit button you should see three dots. Clicking on those should open a menu like in the bellow picture.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/S9iWhy1.png&quot; alt=&quot;&quot;&gt;
&lt;em&gt;Plex Interface&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Click on &lt;strong&gt;Get Info&lt;/strong&gt; and then in the modal that pops up, in the bottom left click on &lt;strong&gt;View XML&lt;/strong&gt;. This will open the media metadata in the form of XML, in a new tab. From the URL of that tab you can extract the &lt;strong&gt;X-Plex-Token&lt;/strong&gt; which coincidentally is the last parameter in the URL.&lt;/p&gt;
&lt;p&gt;After we have points 1 and 2 we can start writing the actual code, for our script.&lt;/p&gt;
&lt;h2&gt;Code&lt;/h2&gt;
&lt;p&gt;I&amp;#39;ll paste the code in it&amp;#39;s entirety and then we can go over it line by line.&lt;/p&gt;
&lt;p&gt;This first things we need to get are the script properties we setup in the first step, of this tutorial.&lt;/p&gt;
&lt;p&gt;Notice there is a variable called &lt;strong&gt;section&lt;/strong&gt;. That represents the ID of the library in the Plex media server. You can get that, by opening the desired library you want to clean and from the URL get the value from the &lt;strong&gt;source&lt;/strong&gt; parameter (hint: it should be the last one).&lt;/p&gt;
&lt;p&gt;Next up, we start building the actual function that does the cleaning up.&lt;/p&gt;
&lt;p&gt;Using the &lt;strong&gt;UrlFetchApp&lt;/strong&gt; library and the fetch method we call the Plex media server to retrieve all the contents of our library. We parse the XML response to JSON using a method that you can find &lt;a href=&quot;https://gist.github.com/stefanbc/2b607c77961d42532043da1ee48d84d1#file-utilities-gs&quot;&gt;here&lt;/a&gt;. You can add the parsing method to the same file, if you want.&lt;/p&gt;
&lt;p&gt;If the &lt;strong&gt;videoContainer&lt;/strong&gt; object was correctly parsed we need to check its type, because Plex will return an object if there is only one child in the library, instead of an array of objects. We&amp;#39;re going to check for the &lt;strong&gt;viewCount&lt;/strong&gt; if it&amp;#39;s true and add everything we find to an array of objects.&lt;/p&gt;
&lt;p&gt;While iterating through the whole array, we make a &lt;strong&gt;DELETE&lt;/strong&gt; type call to the Plex media server, passing the &lt;strong&gt;TOKEN&lt;/strong&gt;, in the headers, and using the &lt;strong&gt;baseURL&lt;/strong&gt; and &lt;strong&gt;videoKey&lt;/strong&gt; as the URL for our call.&lt;/p&gt;
&lt;p&gt;That&amp;#39;s it. You can run the script by clicking the Run icon and the checking the logs in the View menu. You should see a list of all the items deleted.&lt;/p&gt;
&lt;h2&gt;Execution&lt;/h2&gt;
&lt;p&gt;We can automate this script to run at certain times in the day. We can do this by setting a trigger.&lt;/p&gt;
&lt;p&gt;In order to set a trigger, open the &lt;strong&gt;Edit&lt;/strong&gt; menu and click &lt;strong&gt;Current project&amp;#39;s triggers&lt;/strong&gt; and add a new trigger. Bellow is an example of how you could set it up.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/bdSYBL2.png&quot; alt=&quot;&quot;&gt;
&lt;em&gt;Google Scripts&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;There&amp;#39;s no need to run it too often if you don&amp;#39;t watch a lot of shows.&lt;/p&gt;
&lt;h2&gt;Notifications&lt;/h2&gt;
&lt;p&gt;This step is optional, so you don&amp;#39;t have to follow it. I wanted a way to get notified if the script ran and what items were deleted from Plex.&lt;/p&gt;
&lt;p&gt;I decided I was going to use IFTTT but you can use Zapier, Automate.io or even one of Google services to send an email.&lt;/p&gt;
&lt;p&gt;The code is rather simple for IFTTT. You can find it bellow&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;// Notifications
watchedTitles += `${video.grandparentTitle} - ${video.title}`;
watchedTitles += &amp;quot;\r\n&amp;quot;;

if (index === watchedVideos.length - 1) {
    Logger.log(watchedTitles);
    Logger.log(&amp;quot;Notification sent!&amp;quot;);

    let notification =
        `${watchedVideos.length} watched episodes were removed!` +
        &amp;quot;\r\n&amp;quot; +
        watchedTitles;

    let options = {
        method: &amp;quot;POST&amp;quot;,
        contentType: &amp;quot;application/json&amp;quot;,
        payload: JSON.stringify({ value1: notification }),
    };
    UrlFetchApp.fetch(webhook, options);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add this code inside the iteration (after the &lt;strong&gt;DELETE&lt;/strong&gt; call. It&amp;#39;s already in the code I shared above). This will create an array of media titles and send them to a webhook in IFTTT that has a recipe set up to send a notification to my phone. You can customise it however you like.&lt;/p&gt;
&lt;p&gt;Some points before I end this tutorial:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;This project is running on the new Apps Script runtime powered by Chrome V8&lt;/li&gt;
&lt;li&gt;If you have any ideas on how to improve the script let me know.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That&amp;#39;s it. You can also find the code &lt;a href=&quot;https://gist.github.com/stefanbc/2b607c77961d42532043da1ee48d84d1&quot;&gt;here&lt;/a&gt; and if you have any questions let me know. You can reach me on most social media channels.&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>how-to</category><category>tutorials</category><category>google-scripts</category><category>plex</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/photo-1461151304267-38535e780c79.jpg" length="0" type="image/jpeg"/></item><item><title>How To: Run Ghost inside a Docker container on DigitalOcean</title><link>https://stefancosma.xyz/2019/04/01/run-ghost-inside-docker-container-digitalocean</link><guid isPermaLink="true">https://stefancosma.xyz/2019/04/01/run-ghost-inside-docker-container-digitalocean</guid><description>How to run a Ghost instance inside a Docker container on a DigitalOcean droplet that points to a Cloudflare subdomain.</description><pubDate>Mon, 01 Apr 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Recently I created a new theme for Ghost, that you can find &lt;a href=&quot;https://github.com/stefanbc/Asgar&quot;&gt;here&lt;/a&gt; and can currently experience on this website. I wanted a way of showing it off, so anyone that wants to contribute to it or just plain use it, can get a feel of what it looks like in a live environment.&lt;/p&gt;
&lt;p&gt;Initially I looked at Heroku, but I soon fell into a rabbit hole of errors, because Docker doesn&amp;#39;t play nice with Heroku and I didn&amp;#39;t like that I would have to jump through hoops just to keep the app online. Keep in mind that this is an open source project and having to pay for keeping the Heroku app was not something I was prepared to do at that moment.&lt;/p&gt;
&lt;p&gt;But, Stefan, you already have a server, where you host your website! Why don&amp;#39;t you use that? Initially, I wanted to keep my server clean off other systems and just use it for my website. I changed my mind and here we are.&lt;/p&gt;
&lt;p&gt;Enough backstory, let&amp;#39;s get to the actual implementation. Bellow is my current stack and the process I followed that works for my setup. It may work differently for you and your stack.&lt;/p&gt;
&lt;p&gt;My whole stack is like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I have the &lt;code&gt;stefancosma.xyz&lt;/code&gt; domain registered and I use Cloudflare as a DNS provider.&lt;/li&gt;
&lt;li&gt;The website itself is hosted on a DigitalOcean droplet, that runs their Ghost image (an older version but I keep it up to date).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Nothing fancy, right?&lt;/p&gt;
&lt;p&gt;So, the first thing I did was to get Docker working on my droplet. After running &lt;code&gt;apt-get update&lt;/code&gt; I installed Docker using this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apt-get install docker.io
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once that was done, I just spun up a new Docker container for Ghost. Luckily there is already a Docker image for Ghost. You can check it out &lt;a href=&quot;https://hub.docker.com/_/ghost&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now the tricky part. I ran this command to expose the Ghost instance in the Docker container, to the outside world.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker run -d --name name_your_container -p 3001:2368 -e url=https://ghost_url ghost
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So, what this command does, is that it runs a new container with a custom name and it exposes the Ghost port &lt;code&gt;2368&lt;/code&gt; on the host&amp;#39;s &lt;code&gt;3001&lt;/code&gt; port. Of course you can use a different port on your machine, if you so desire. Another cool thing is that this Docker image accepts, as parameters, any Ghost configuration parameters, found &lt;a href=&quot;https://docs.ghost.org/concepts/config/&quot;&gt;here&lt;/a&gt;. The Docker image name is &lt;code&gt;ghost&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So now, if you access your droplets IP followed by the &lt;code&gt;3001&lt;/code&gt; port, you should see a new Ghost instance up and running.&lt;/p&gt;
&lt;p&gt;The last thing I did was to spin up a new subdomain inside Nginx and add it to Cloudflare. The configuration I used for Nginx is similar to the one bellow:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name subdomain.domain.com;

    ssl_certificate certificate.cert;
    ssl_certificate_key key.key;
    include conf.conf;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass http://127.0.0.1:3001;

    }

    location ~ /.well-known {
        allow all;
    }

    client_max_body_size 50m;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Besides the above configuration, I&amp;#39;ve added a CNAME record with the subdomain name that points to the root domain.&lt;/p&gt;
&lt;p&gt;And that&amp;#39;s it. All good and done.&lt;/p&gt;
&lt;p&gt;Nothing out of the ordinary. How would you have done it differently? Tweet &lt;a href=&quot;https://twitter.com/stefanbc&quot;&gt;@stefanbc&lt;/a&gt; or email me &lt;a href=&quot;mailto:hello@stefancosma.xyz&quot;&gt;hello@stefancosma.xyz&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper.&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>how-to</category><category>tutorials</category><category>digitalocean</category><category>ghost-tag</category><category>cloudflare</category><category>docker</category><category>nginx</category><category>subdomain</category><category>domains</category><category>devops</category></item><item><title>How To: Organise a web developer meetup</title><link>https://stefancosma.xyz/2018/11/23/how-to-organise-developer-meetup</link><guid isPermaLink="true">https://stefancosma.xyz/2018/11/23/how-to-organise-developer-meetup</guid><description>This was my first time organising an event. Bellow are the steps I followed when I organised the Sibiu Web Meetup.</description><pubDate>Fri, 23 Nov 2018 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;Disclaimer: This post was automatically published a few hours after the event so let&amp;#39;s hope everything went according to plan.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I recently had the opportunity to organise a meetup, that revolved around the idea of knowledge exchange and community building. I&amp;#39;ve had this idea for a very long time. Ever since I was working with the team over @koding, where I helped grow the community and before that, when I was in collage, because I couldn&amp;#39;t find any clubs or meetups of like minded people around my hometown.&lt;/p&gt;
&lt;p&gt;But you may ask why a real life event, instead of creating an online community? Because when you&amp;#39;re meeting people face to face you have a better understanding of what they&amp;#39;re trying to communicate with you, whether it&amp;#39;s feelings of disagreement or just want to share knowledge with you.&lt;/p&gt;
&lt;p&gt;This was my first time organising an irl event. Bellow are the steps I followed when I organised the &lt;a href=&quot;https://meetup.com/sibiu-web-meetup&quot;&gt;Sibiu Web Meetup&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Overview&lt;/h3&gt;
&lt;p&gt;In the case of the meetup I organised, I wanted it to be free, with limited seats (because, well, it&amp;#39;s not a conference), for anyone interested in web development, web design and all other web related topics. All skill levels are welcome, this includes students, juniors and senior devs. It should be a meetup that revolves around the idea of knowledge exchange and community building. Also this could be a monthly meetup or every two months (still haven&amp;#39;t decided on this aspect).&lt;/p&gt;
&lt;p&gt;When you start putting the event together, make sure you inform your attendees about all the things that you want to achieve with your meetup and share as much details as possible (when, where and why).&lt;/p&gt;
&lt;h3&gt;Details&lt;/h3&gt;
&lt;p&gt;Now let&amp;#39;s talk about the actual details of organising a meetup.&lt;/p&gt;
&lt;p&gt;The first thing I did, was to see if anyone wanted to talk about the web, at a local meetup. Luckily I have some friends that have held talks in the past and have extensive knowledge about the web. I presented the idea and told them that they&amp;#39;re free to talk about anything web related and after some proposals, we came to some consensus on what the talks should be about.&lt;/p&gt;
&lt;p&gt;Ok, talks, checked. Now I needed a place to host the meetup. Enter the local university, that was more the gracious into providing a room for the meetup and as an added bonus the students from the Computer Science major would be invited and would get a chance to meet professional developers and gain some knowledge from the field, something I didn&amp;#39;t have when I was in collage. Students being able to connect with professional developers is something beneficial to both parties. On one hand the students learn something new and on the other hand professional developers get to share their knowledge with someone else. I know you can find people online that are more than willing to help out but it&amp;#39;s something different when you actually meet someone in person.&lt;/p&gt;
&lt;p&gt;Place, checked. It was now time to let people know about the meetup. So a small social media campaign was started. This included sharing on all the social media channels and printing some ads for the university to use, so that students could find out about the event. In terms of attendance, I wanted it to be a small gathering of people, not a full fledged event, like a conference might be. If you let them know about the event they will come, even if it&amp;#39;s just out of curiosity.&lt;/p&gt;
&lt;p&gt;Bellow is a checklist that I&amp;#39;ve put together, with ideas that I implemented for the meetup, things that you should not forget about, when organising an event.&lt;/p&gt;
&lt;h3&gt;Speakers&lt;/h3&gt;
&lt;p&gt;The most important aspect of the whole event.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;3 speakers - with ~30 min max per talk + QA session.&lt;/li&gt;
&lt;li&gt;Diverse panel of speakers.&lt;/li&gt;
&lt;li&gt;1 host - to keep everything in check.&lt;/li&gt;
&lt;li&gt;2 hour time frame - have a break after the first two speakers.&lt;/li&gt;
&lt;li&gt;Networking with the speakers at the end of the meetup.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Place&lt;/h3&gt;
&lt;p&gt;Any place is a good place. If it&amp;#39;s sunny and warm you can have it outside.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Find a classroom at your local University, a co-working space or even your local pub or cafe. Start small and grow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Attendance&lt;/h3&gt;
&lt;p&gt;Make sure that the people who attend are the actual target audience, people that can actually help you into building a community and share knowledge.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Maximum of 30 places. Make sure you have the possibility of growing based on popularity.&lt;/li&gt;
&lt;li&gt;Students have priority. Because we want as many of them to actually learn something from the professionals.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Social media marketing&lt;/h3&gt;
&lt;p&gt;The more people know about it, the larger the community and the more knowledge is exchanged.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Promote on LinkedIn, Twitter, Facebook (Instagram), Reddit etc. Create an easy to remember hashtag and create a Facebook event. Also don&amp;#39;t forget to choose a cool title for your meetup.&lt;/li&gt;
&lt;li&gt;The social media marketing process will be a collaboration between the parts involved. Get you attendees to share the event if they want to do so.&lt;/li&gt;
&lt;li&gt;Use &lt;a href=&quot;https://meetup.com&quot;&gt;meetup.com&lt;/a&gt; as a platform to organise everything.&lt;/li&gt;
&lt;li&gt;Use &lt;a href=&quot;https://speakerdeck.com&quot;&gt;speakerdeck.com&lt;/a&gt; to host the presentations.&lt;/li&gt;
&lt;li&gt;[Optional] Setup a weekly newsletter with useful web links.&lt;/li&gt;
&lt;li&gt;[Optional] Print and pass QR stickers around with a link to the event.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Extra&lt;/h3&gt;
&lt;p&gt;Anything that can improve the whole experience for everyone.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Creation of a Slack group to share extra knowledge and ask the pros for help with certain areas. Pro-bono mentoring program through Slack.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I want to wrap this app with just a few mentions.&lt;/p&gt;
&lt;p&gt;Choose the topics very carefully and try to keep them interesting. Ask the attendees if some of them want to host a talk at the next gathering. Plan your next meetup before the current one takes place. Make sure you choose an easy to remember title for your meetup. And lastly make sure everyone has fun.&lt;/p&gt;
&lt;p&gt;If you have any other ideas that you&amp;#39;ve implemented at your meetups, do let me know &lt;a href=&quot;https://twitter.com/stefanbc&quot;&gt;@stefanbc&lt;/a&gt;, I would love to hear them.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit:&lt;/em&gt; &lt;a href=&quot;http://guillaumekurkdjian.com/&quot;&gt;&lt;em&gt;Guillaume Kurkdjian&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>developers</category><category>meetup</category><category>explanation</category><category>culture</category><category>community</category><category>how-to</category><category>advice</category><category>experience</category><category>speaking</category><category>tips-tricks</category><category>useful</category><category>students</category><category>knowledge</category><category>sibiu-web-meetup</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/PXL_20240118_171625622.jpg" length="0" type="image/jpeg"/></item><item><title>How To: Use Tomcat in Intellij IDEA Community</title><link>https://stefancosma.xyz/2018/10/01/how-to-use-tomcat-intellij-idea-community</link><guid isPermaLink="true">https://stefancosma.xyz/2018/10/01/how-to-use-tomcat-intellij-idea-community</guid><description>A short tutorial on how to setup Tomcat in Intellij IDEA Community and how to use Maven to build your project and then deploy it to Tomcat.</description><pubDate>Mon, 01 Oct 2018 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Recently I started working on a project that required me to have the backend part installed locally, instead of using a remote backend. The project uses Maven as a build tool and it deploys the code to a Tomcat server.&lt;/p&gt;
&lt;p&gt;I got cracking and started configuring the project on my local machine. The first thing I noticed is that Intellij IDEA Community does not have a Tomcat plugin, unlike the Ultimate edition, that has one out of the box.&lt;/p&gt;
&lt;p&gt;Many Google searches later I found a few plugins that might do the trick but when I tried using them, the famous NullPointerException happened and I started looking for an alternative. I found some inspiration on Github, but not in the form I wanted, but it was good enough to get me started.&lt;/p&gt;
&lt;p&gt;Bellow is a short tutorial on how to setup Tomcat in Intellij IDEA Community to run/debug, and how to use Maven to build your project and then deploy it to Tomcat.&lt;/p&gt;
&lt;h2&gt;Prerequisites&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Install Intellij IDEA Community.&lt;/li&gt;
&lt;li&gt;Install Tomcat - For my project I&amp;#39;ve used Tomcat 8. You can get it from &lt;a href=&quot;https://tomcat.apache.org/download-80.cgi&quot;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install Maven.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Tomcat Configuration&lt;/h2&gt;
&lt;p&gt;Make sure you install Tomcat in a place that doesn&amp;#39;t require admin access, for example next to your project.&lt;/p&gt;
&lt;p&gt;After that, open &lt;code&gt;File -&amp;gt; Settings&lt;/code&gt; and expand &lt;code&gt;Tools&lt;/code&gt; and select &lt;code&gt;External Tools&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can add a new tool with whatever name you want. I named mine, Tomcat. For tool settings, select the &lt;code&gt;catalina.bat&lt;/code&gt; file, usually located in the &lt;code&gt;bin&lt;/code&gt; folder of your Tomcat installation. For example mine is &lt;code&gt;C:\apache-tomcat-8.5.34\bin\catalina.bat&lt;/code&gt;. And last but not least set an argument with the command &lt;code&gt;jpda run&lt;/code&gt;. The working directory should be set automatically.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/n90GnDc.png&quot; alt=&quot;&quot;&gt;
&lt;em&gt;Tomcat External Tool&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Start Tomcat&lt;/h2&gt;
&lt;p&gt;If you go to &lt;code&gt;Tools -&amp;gt; External Tools&lt;/code&gt; and click on Tomcat, it should start the Tomcat server.&lt;/p&gt;
&lt;h2&gt;Maven build and deploy to Tomcat&lt;/h2&gt;
&lt;p&gt;Now that you&amp;#39;re done with the Tomcat configuration you want the ability to build using Maven and deploy to the now working Tomcat server.&lt;/p&gt;
&lt;p&gt;To achieve this you&amp;#39;ll need to head over to &lt;code&gt;Run -&amp;gt; Edit Configurations&lt;/code&gt;, click the &amp;quot;+&amp;quot; and select &lt;code&gt;Maven&lt;/code&gt;. Don&amp;#39;t forget to name your new configuration. Select your project location and add the following command line.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;war:war org.codehaus.mojo:wagon-maven-plugin:upload-single -Dwagon.fromFile=D:\work\project\backend.war -Dwagon.url=file://C:\apache-tomcat-8.5.34\webapps\
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What this line does is that it builds the project, using Maven, and then gets the file from the specified path (that&amp;#39;s usually configured in your project) and copies it to the &lt;code&gt;webapps&lt;/code&gt; folder in Tomcat. Tomcat then knows it has a new version of the file and redeploys it.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/p1AH4PH.png&quot; alt=&quot;&quot;&gt;
&lt;em&gt;Build and deploy to Tomcat&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Tomcat Remote Debug&lt;/h2&gt;
&lt;p&gt;Like all applications you want the ability to debug your backend. To achieve this you&amp;#39;ll need to add a new configuration like the previous step. The only difference this time is that when you click &amp;quot;+&amp;quot; you&amp;#39;ll need to select &lt;code&gt;Remote&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Give your configuration a name. You&amp;#39;ll need to set the Debugger mode to &lt;code&gt;Attach to remote JVM&lt;/code&gt;, the Transport to &lt;code&gt;Socket&lt;/code&gt;, the Host to &lt;code&gt;localhost&lt;/code&gt; and lastly the Port to &lt;code&gt;8000&lt;/code&gt;. That way when you start the configuration, Intellij will connect via Socket to the Tomcat server that emits via port &lt;code&gt;8000&lt;/code&gt;. You can change the port for Tomcat, to something else, in the Tomcat &lt;code&gt;server.xml&lt;/code&gt; file, in the config folder.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/0sqI0hD.png&quot; alt=&quot;&quot;&gt;
&lt;em&gt;Tomcat Remote Debug&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Once the Tomcat server is started you can run this configuration. Just click on &lt;code&gt;Run -&amp;gt; Debug&lt;/code&gt; and then select the newly created configuration.&lt;/p&gt;
&lt;p&gt;If you want to keep a record of all the logs when debugging, you can achieve this by going to the Logs tabs in the newly created Remote configuration and set the Save console output to file to the &lt;code&gt;logs&lt;/code&gt; folder of your Tomcat installation. In my case it was &lt;code&gt;C:\apache-tomcat-8.5.34\logs*.*&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/BSxR11Q.png&quot; alt=&quot;&quot;&gt;
&lt;em&gt;Tomcat Remote Debug Logs&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;That is it. @ me on Twitter if you think I&amp;#39;ve missed something or if there is another way of doing this without installing Eclipse or purchasing the Ultimate edition of Intellij IDEA.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>tutorials</category><category>how-to</category><category>backend</category><category>java</category><category>intellij</category><category>tomcat</category><category>maven</category><category>setup-tag</category><category>community</category></item><item><title>Just Another Cluster #6</title><link>https://stefancosma.xyz/2017/01/14/just-another-cluster-6</link><guid isPermaLink="true">https://stefancosma.xyz/2017/01/14/just-another-cluster-6</guid><description>Issues #6 - I&apos;m gathering stuff, making a list, writing a few words about each one and then sharing with the world.</description><pubDate>Sat, 14 Jan 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I&amp;#39;m gathering stuff, interesting articles, useful tools or amazing videos, and then make a list with all of them with comments for each one.&lt;/p&gt;
&lt;h3&gt;This is issue number #6.&lt;/h3&gt;
&lt;p&gt;You can checkout the &lt;a href=&quot;/tag/just-another-cluster/&quot;&gt;previous issues&lt;/a&gt; if you&amp;#39;re interested.&lt;/p&gt;
&lt;p&gt;If you find any interesting tools or articles that I might have missed, let me know &lt;a href=&quot;https://twitter.com/stefanbc&quot;&gt;@stefanbc&lt;/a&gt; and I&amp;#39;ll share them in the next cluster.&lt;/p&gt;
&lt;p&gt;So, here are some interesting links and articles!&lt;/p&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://medium.freecodecamp.com/code-dependencies-are-the-devil-35ed28b556d#.aj0ooptbo&quot;&gt;Code dependencies are the devil.&lt;/a&gt;&lt;br&gt;This article tries to tackle the subject of dependencies and why we make them central in our applications even if they will become obsolete in a few years, as the technology advances.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://benmccormick.org/2017/01/03/orthogonality-and-css-in-js/&quot;&gt;Orthogonality and CSS in JS&lt;/a&gt;&lt;br&gt;Should JavaScript, HTML and CSS files be bundled and managed completely separately? Kept in different files and imported together into JavaScript component files? Or can we remove HTML and CSS files entirely and generate everything in JavaScript?&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tylergaw.com/articles/sass-to-postcss&quot;&gt;From Sass to PostCSS&lt;/a&gt;&lt;br&gt;It seems there is a new trend rising these days. Trying to replace perfectly working things with something that just came out of the oven, that is hot and you can&amp;#39;t quit taste yet.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/ryanmcdermott/clean-code-javascript&quot;&gt;Clean Code concepts adapted for JavaScript&lt;/a&gt;&lt;br&gt;This is a very well written guide to producing readable, reusable, and refactorable software in JavaScript.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://dev.to/briandgls/creating-fractals&quot;&gt;Creating Fractals&lt;/a&gt;&lt;br&gt;Have you ever wondered how you can create fractals in JavaScript, well wonder no more because someone actually took the time to write an article on how you can achieve that.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://thenewcode.com/1168/Improve-the-Look-of-Links-with-the-CSS-Text-Decoration-Module&quot;&gt;Improve the Look of Links with the CSS Text Decoration Module&lt;/a&gt;&lt;br&gt;Did you know about the &lt;code&gt;text–decoration–skip&lt;/code&gt; and &lt;code&gt;text–decoration–color&lt;/code&gt; CSS attributes? Checkout this article to learn more about what you can do with them.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.zeldman.com/2017/01/03/kiss-my-classname/&quot;&gt;Kiss my classname&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Nonsemantic classnames that refer to visual styles will always be a bad idea.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol start=&quot;8&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://www.toptal.com/front-end/postcss-sass-new-play-date&quot;&gt;PostCSS: Sass’s New Play Date&lt;/a&gt;&lt;br&gt;Another article about PostCSS, because it&amp;#39;s the new kid on the block that needs attention from everyone.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://medium.com/dailycssimages/a-beginners-guide-to-pure-css-images-ef9a5d069dd2#.1sexugk21&quot;&gt;A Beginner’s Guide to Pure CSS Images&lt;/a&gt;&lt;br&gt;Did you know you can create images entirely out of CSS? This handy guide is a great basis for anyone interested in this subject.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://thedesignteam.io/the-type-snob-f221969a884b#.y219d3uzd&quot;&gt;The type snob&lt;/a&gt;&lt;br&gt;A brilliant article by Pablo Stanley about how anyone can become a type snob.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://nolanlawson.com/2017/01/09/how-to-write-a-javascript-package-for-both-node-and-the-browser&quot;&gt;How to write a JavaScript package for both Node and the browser&lt;/a&gt;&lt;br&gt;Not sure if this article needs any intro, because it&amp;#39;s pretty self explanatory.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;http://guillaumekurkdjian.com/&quot;&gt;Guillaume Kurkdjian&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>links</category><category>articles</category><category>just-another-cluster</category><category>issue</category><category>sharing</category><category>useful</category><category>development</category><category>code</category><category>dependencies</category><category>javascript</category><category>css</category><category>sass</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/c68iK4V.gif" length="0" type="image/gif"/></item><item><title>Visual Studio Code - Tips &amp; Tricks</title><link>https://stefancosma.xyz/2017/01/08/visual-studio-code-tips-tricks</link><guid isPermaLink="true">https://stefancosma.xyz/2017/01/08/visual-studio-code-tips-tricks</guid><description>Here are some tips and tricks that you can use with Visual Studio Code. From useful extensions to awesome shortcuts, I made a list of all of them.</description><pubDate>Sun, 08 Jan 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;If you&amp;#39;re following me on Twitter you probably know how much I enjoy using Microsoft&amp;#39;s Visual Studio Code. So much, that one of my tweets is currently featured on their &lt;a href=&quot;https://code.visualstudio.com/&quot;&gt;main page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But this article is not about how much I enjoy my code editor, it&amp;#39;s about what things you can do with this code editor. From useful extensions to shortcuts you probably didn&amp;#39;t know about or even making your code editor more light on the eyes, this article is going to showcase some awesome stuff that I found while using it.&lt;/p&gt;
&lt;h2&gt;Extensions&lt;/h2&gt;
&lt;p&gt;We begin our showcase with some awesome extensions. Now, I&amp;#39;m not going to share all the extensions that I use because some of them are really project focused, but instead I&amp;#39;m going to share the ones that are more generic and make my life as a developer much more easier.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag&quot;&gt;Auto Close Tag&lt;/a&gt; - Automatically add HTML/XML close tag.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory&quot;&gt;Git History (git log)&lt;/a&gt; - View git log, file or line History.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion&quot;&gt;HTML CSS Class Completion&lt;/a&gt; - Provides CSS class name completion for the HTML class attribute based on the CSS files on your workspace.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=tht13.html-preview-vscode&quot;&gt;HTML Preview&lt;/a&gt; - An extension to preview HTML or Jade files while editing them.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=abusaidm.html-snippets&quot;&gt;HTML Snippets&lt;/a&gt; - Full HTML tags including HTML5 Snippets&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=xabikos.JavaScriptSnippets&quot;&gt;JavaScript (ES6) code snippets&lt;/a&gt; - Code snippets for JavaScript in ES6 syntax.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-vscode.js-atom-grammar&quot;&gt;JavaScript Atom Grammar&lt;/a&gt; - The Atom editor&amp;#39;s JavaScript text mate grammar.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=donjayamanne.jquerysnippets&quot;&gt;jQuery Code Snippets&lt;/a&gt; - Over 130 jQuery Code Snippets&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=dbaeumer.jshint&quot;&gt;jshint&lt;/a&gt; - Integrates JSHint into VS Code. JSHint is a linter for JavaScript.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync&quot;&gt;Settings Sync&lt;/a&gt; - Synchronize Settings, Snippets, launch, keybindings, workspaces and extensions Across Multiple Machines using Github Gist.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=seanmcbreen.Spell&quot;&gt;Spelling and Grammar Checker&lt;/a&gt; - Uses a web service to detect mistakes and suggest fixes - great for Markdown or any text file.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=cssho.vscode-svgviewer&quot;&gt;SVG Viewer&lt;/a&gt; - Pretty self explanatory.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The extensions that I listed above are some of the ones that I use on a daily basis. If I were to choose that ones that I couldn&amp;#39;t live without it would be #1, #2, #6, #9, #10.&lt;/p&gt;
&lt;p&gt;For example #10 is a life saver because I&amp;#39;m always switching between my work MB Pro and the MB Air I have at home, so by having a system in place that helps me synchronize my settings is textbook awesome.&lt;/p&gt;
&lt;h2&gt;Shortcuts&lt;/h2&gt;
&lt;p&gt;Next up are shortcuts. I usually have a few shortcuts that I absolutely can&amp;#39;t live without. For example &lt;code&gt;CTRL + D&lt;/code&gt; for multiselect is a must have.&lt;/p&gt;
&lt;p&gt;When VS Code came along with it&amp;#39;s integrated Terminal and introduced shortcuts for it, I was hooked. If you&amp;#39;re like me and hate to always have to switch between the code editor and the Terminal then you&amp;#39;re going to enjoy this. I usually tend to avoid to use the trackpad when I write code that&amp;#39;s why I&amp;#39;m going to share some shortcuts that will help you while you code and need a Terminal at the same time.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;CTRL + `&lt;/code&gt; - with this shortcut you can toggle the integrated Terminal.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CTRL + SHIFT + `&lt;/code&gt; - this shortcut will add a new Terminal instance, so you can easily work with multiple things at the same time.&lt;/li&gt;
&lt;li&gt;But what if you want to switch between terminal instances? I added a few key bindings so I can easily switch between terminal instances. Of course you can customize them to your liking.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;[  
   {  
      &amp;quot;key&amp;quot;:&amp;quot;ctrl+shift+=&amp;quot;,
      &amp;quot;command&amp;quot;:&amp;quot;workbench.action.terminal.focusNext&amp;quot;,
      &amp;quot;when&amp;quot;:&amp;quot;terminalFocus&amp;quot;
   },
   {  
      &amp;quot;key&amp;quot;:&amp;quot;ctrl+shift+-&amp;quot;,
      &amp;quot;command&amp;quot;:&amp;quot;workbench.action.terminal.focusPrevious&amp;quot;,
      &amp;quot;when&amp;quot;:&amp;quot;terminalFocus&amp;quot;
   }
]
&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;&lt;code&gt;CTRL + Q&lt;/code&gt; - In a recent updated the team behind VS Code introduces a new feature. The ability to switch between the different views in the sidebar. Using this shortcut you can easily switch between the Explorer view or the Github view or even the search view.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CMD / WIN + B&lt;/code&gt; - I for one like to keep things as light as possible when I&amp;#39;m writing code. With this shortcut you can easily show or hide the sidebar.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The shortcuts I outline above are the ones that I use most often. There are lots of them, that I didn&amp;#39;t even mention, and if I did it would overlook the whole purpose of this article. If you know any more, that you think are really useful, let me know and I&amp;#39;ll add them to the list.&lt;/p&gt;
&lt;h2&gt;Misc&lt;/h2&gt;
&lt;p&gt;Since I can&amp;#39;t end the article by talking about shortcuts, here are some more cool things you can do in VS Code. Did you know you can hide the activity bar from the View menu? Well, now you do. This feature was added a recent updated and I can say that it is very helpful, even if one has enough real-estate on his/hers monitors.&lt;/p&gt;
&lt;p&gt;What about looks? I, for one, prefer the Spacegray theme. I liked that theme ever since I first found it available while I was using Sublime Text 2. Luckily someone made it available for VS Code as well. Check it out &lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ionutvmi.spacegray-vscode&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And last, but certainly not least, did you know you can compare files out of the box? I recently needed to compare two different versions of the same file and because they were not on Github, I needed another easy way to achieve this. After a few searches and some extensions later I stumbled upon an article that outlines how you can do that directly inside VS Code. And because I like to give credit where credit is due here is &lt;a href=&quot;http://dailydotnettips.com/2015/06/04/how-to-compare-files-in-visual-studio-code/&quot;&gt;the article in question&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now, don&amp;#39;t get me wrong, I know the things I shared in this article are just a small taste of what VS Code can do, that is why I&amp;#39;m extending an invitation to anyone who is using VS Code to share their experience and their tips and tricks.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;http://guillaumekurkdjian.com/&quot;&gt;Guillaume Kurkdjian&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>development</category><category>tools</category><category>tips-tricks</category><category>visual-studio-code</category><category>shortcuts</category><category>extensions</category><category>useful</category><category>developers</category><category>sharing</category><category>themes</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/CJ67iSP.gif" length="0" type="image/gif"/></item><item><title>Just Another Cluster #5</title><link>https://stefancosma.xyz/2017/01/06/just-another-cluster-5</link><guid isPermaLink="true">https://stefancosma.xyz/2017/01/06/just-another-cluster-5</guid><description>Issues #5 - I&apos;m gathering stuff, making a list, writing a few words about each one and then sharing with the world.</description><pubDate>Fri, 06 Jan 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I&amp;#39;m gathering stuff like interesting articles, useful tools or amazing videos, and then make a list with all of them with comments for each one.&lt;/p&gt;
&lt;h3&gt;This is issue number #5.&lt;/h3&gt;
&lt;p&gt;You can checkout the &lt;a href=&quot;/tag/just-another-cluster/&quot;&gt;previous issues&lt;/a&gt; if you&amp;#39;re interested.&lt;/p&gt;
&lt;p&gt;If you find any interesting tools or articles that I might have missed, let me know &lt;a href=&quot;https://twitter.com/stefanbc&quot;&gt;@stefanbc&lt;/a&gt; and I&amp;#39;ll share them in the next cluster.&lt;/p&gt;
&lt;p&gt;So, here are some interesting links and articles!&lt;/p&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://hackernoon.com/10-things-i-learned-making-the-fastest-site-in-the-world-18a0e1cdf4a7#.p2kf982j1&quot;&gt;10 things I learned making the fastest site in the world&lt;/a&gt;&lt;br&gt;This Medium articles is about performance techniques. This should come in handy for anyone who&amp;#39;s obsessed with website performance and speed.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://runkit.com/npm/regexgen&quot;&gt;regexgen&lt;/a&gt;&lt;br&gt;A pretty nifty tool that helps anyone generate regular expressions that match a set of strings.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/lk-geimfari/awesomo&quot;&gt;A.W.E.S.O.M. O&lt;/a&gt;&lt;br&gt;The really big list of really interesting open source projects.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://calendar.perfplanet.com/2016/loading-web-fonts-asynchronously/&quot;&gt;Loading web fonts asynchronously&lt;/a&gt;&lt;br&gt;Have you ever wondered how you can load web fonts async? Well Bram Stein tries to explain the process in great detail.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gziolo.pl/2016/12/21/exploring-functional-javascript/&quot;&gt;Exploring functional JavaScript&lt;/a&gt;&lt;br&gt;How can functional programming improve the developer’s experience when one works with JavaScript. A really interesting subject that this article will explore.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ponyfoo.com/articles/var-let-const&quot;&gt;Let’s use const! Here’s why.&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;ES6 offers let and const as new flavors of variable declaration, and part of the value in these statements is that they can signal how a variable is used.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol start=&quot;7&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://madebymike.com.au/writing/interpolation-without-animation/&quot;&gt;Interpolation in CSS without animation&lt;/a&gt;&lt;br&gt;Interpolation is the estimation of a new value between two known values. This simple concept is vastly useful and it’s commonly seen in animation on the web. But how can one use it CSS without animation?&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jensimmons.com/post/jan-4-2017/replacing-jet-engine-while-still-flying&quot;&gt;Replacing the Jet Engine While Still Flying&lt;/a&gt;&lt;br&gt;Jen Simmons explains how the team behind Firefox will try to replace the current browser rendering engine, Gecko, with the new one, codename Servo.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;http://guillaumekurkdjian.com/&quot;&gt;Guillaume Kurkdjian&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>links</category><category>articles</category><category>just-another-cluster</category><category>issue</category><category>sharing</category><category>useful</category><category>development</category><category>performance</category><category>regex</category><category>firefox</category><category>javascript</category><category>css</category><category>es6</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/c68iK4V.gif" length="0" type="image/gif"/></item><item><title>Building a project - workflow, development stack.</title><link>https://stefancosma.xyz/2016/12/30/building-project-workflow-development-stack</link><guid isPermaLink="true">https://stefancosma.xyz/2016/12/30/building-project-workflow-development-stack</guid><description>An article that will cover some basics regarding the build stack and the deploy process of a very simple project.</description><pubDate>Fri, 30 Dec 2016 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Sometimes, I need to calculate the aspect ratio of an image to make sure I resizes it correctly and because I&amp;#39;m to lazy to actually do the math (but I ended up doing it anyway!) or use something found on the web, I decided to build an aspect ratio calculator, because why not.&lt;/p&gt;
&lt;p&gt;Enter &lt;a href=&quot;http://stefanbc.github.io/arca&quot;&gt;arca - a simple aspect ratio calculator&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/NefpW17.png&quot; alt=&quot;arca&quot;&gt;&lt;/p&gt;
&lt;p&gt;I built this project in the course of a few weekend hours, and during this time I&amp;#39;ve cemented my own basic workflow and deploy process.&lt;/p&gt;
&lt;p&gt;For the rest of this article I&amp;#39;m going to talk more about the stack and the deploy process I&amp;#39;ve used rather then the actual project, since, well it&amp;#39;s an aspect ratio calculator, there&amp;#39;s not much to talk about it anyway.&lt;/p&gt;
&lt;h2&gt;Build stack&lt;/h2&gt;
&lt;p&gt;For the actual build process I&amp;#39;m using and will continue using GruntJS. Now, I know there are a lot of debates at the moment on what one should use when building an app. Whether it&amp;#39;s Grunt, Gulp or npm scripts, people seem to forget the most important thing, it doesn&amp;#39;t matter what you use as long as it gets the job done.&lt;/p&gt;
&lt;p&gt;I prefer Grunt because it&amp;#39;s much more easy to set up and to understand, when for example, someone else comes along and tries to understand the logic behind your project.&lt;/p&gt;
&lt;p&gt;The Grunt modules I generally use are as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/gruntjs/grunt-contrib-clean&quot;&gt;grunt-contrib-clean&lt;/a&gt; - to clean up everything in the build folder before a new build starts&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/gruntjs/grunt-contrib-pug&quot;&gt;grunt-contrib-pug&lt;/a&gt; - templating system, instead of placing everything in HTML files. Very versatile because it gives me the ability to use blocks and mixins.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/gruntjs/grunt-contrib-sass&quot;&gt;grunt-contrib-sass&lt;/a&gt; - Sass or LESS? Sass all the way!&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/gruntjs/grunt-contrib-coffee&quot;&gt;grunt-contrib-coffee&lt;/a&gt; - instead or writing everything in vanilla JS, I decided to use CoffeeScript, for the sake of readability and how clean the code looks.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/gruntjs/grunt-contrib-uglify&quot;&gt;grunt-contrib-uglify&lt;/a&gt; - after all that good looking code I compress everything.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/gruntjs/grunt-contrib-jshint&quot;&gt;grunt-contrib-jshint&lt;/a&gt; - because the files actually need to be valid.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/gruntjs/grunt-contrib-watch&quot;&gt;grunt-contrib-watch&lt;/a&gt; - it triggers when a modification has been made to a file. I like to call it the Eye of Sauron.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/sindresorhus/time-grunt&quot;&gt;time-grunt&lt;/a&gt; - I use this one to monitor how long a certain task takes to run.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now, that we&amp;#39;ve gone through the Grunt modules that I use the most often, I&amp;#39;m going to share some of the things that I&amp;#39;ve added to my Grunt configuration to make it more usable.&lt;/p&gt;
&lt;p&gt;For example I wanted a way to pass certain configuration variables to my HTML files. Luckily Jade (sorry Pug!) knows how to do this, as you can read bellow.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;jade: {
    build: {
        options: {
            data: function(dest, src) {
                return require(&amp;#39;./lib/settings.json&amp;#39;);
            }
        },
        files: {
            &amp;#39;./bin/index.html&amp;#39;: &amp;#39;./lib/views/index.jade&amp;#39;
        }
    }
},
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By passing a &lt;code&gt;.json&lt;/code&gt; file into the data parameter, I can easily configure anything I want.&lt;/p&gt;
&lt;p&gt;Another thing that I found useful was to add the option to build the project while I issue a &lt;code&gt;grunt watch&lt;/code&gt; command. I did this like so:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;watch: {
    options: {
        atBegin: true
    },
    ...
    [rest of the config]
    ...
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I&amp;#39;m not going to go through the whole Grunt configuration file, that&amp;#39;s another article for some other time.&lt;/p&gt;
&lt;p&gt;Now on to the language part of things.&lt;/p&gt;
&lt;h2&gt;Language stack&lt;/h2&gt;
&lt;p&gt;I try to keep the language stack as small as possible. I don&amp;#39;t like to mix and match too many languages when working on a project. Bellow are the languages I use on a general basis when starting a new project. In the future I may introduce new ones but for now I&amp;#39;m sticking to these ones.&lt;/p&gt;
&lt;h3&gt;CoffeScript&lt;/h3&gt;
&lt;p&gt;As you&amp;#39;re already aware, from what I&amp;#39;ve written above, I&amp;#39;m using CoffeScript instead of regular, good old vanilla JS. The main reason behind this approach is that the code is much more readable than regular JS. At least that&amp;#39;s how I perceive it. And using GruntJS allows me to easily compile that CoffeScript into regular JS.&lt;/p&gt;
&lt;h3&gt;Sass&lt;/h3&gt;
&lt;p&gt;I won&amp;#39;t start a debate why Sass is better than LESS. I use Sass because it&amp;#39;s easier to handle, there are a lot of mixins out there or frameworks that already have support for Sass and the community behind it is amazing. Probably in the near future when the support for CSS variables will be improved I&amp;#39;ll switch, but until then I like my nesting, variables and mixins.&lt;/p&gt;
&lt;h3&gt;Jade&lt;/h3&gt;
&lt;p&gt;Or Pug, as it&amp;#39;s now called. I prefer using a templating system because it offers me the ability to modularise each section of the application into more manageable pieces. For example I want to have a mixin for a certain component.&lt;/p&gt;
&lt;p&gt;Pug allows me to use logic inside HTML and thus minimizing the JS code that I write. It also gives me the ability to pass certain constant values to the actual code. I usually generate a &lt;code&gt;settings.json&lt;/code&gt; file that will help me use a name, a description, a color in multiple places without having to copy/paste that value everywhere.&lt;/p&gt;
&lt;h3&gt;PHP&lt;/h3&gt;
&lt;p&gt;When I started working on &lt;a href=&quot;https://github.com/stefanbc/uptimey&quot;&gt;uptimey&lt;/a&gt; I was still developing a lot of WordPress websites and eCommerce platforms so naturally I went with something I already knew and could easily handle and maintain. So for server side scripting I generally used PHP to handle anything that I might need.&lt;/p&gt;
&lt;p&gt;PHP is a vary versatile language and I enjoy writing code in it, but if I were to start a new project now, I would probably use something else.&lt;/p&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;p&gt;The dependency list isn&amp;#39;t that long either. A must have for me is require.js, so bellow I&amp;#39;ll explain how I normally use it.&lt;/p&gt;
&lt;h3&gt;require.js&lt;/h3&gt;
&lt;p&gt;Because require.js gives the ability to load scripts based on their dependencies, it&amp;#39;s a real life saver when it comes to speed and loading times. Bellow you&amp;#39;ll notice the actual configuration file that I normally use when starting a blank project. The main script file will, usually, require jQuery and because of that, jQuery is the first thing loaded before the actual app.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;requirejs.config({
    baseUrl: &amp;#39;js&amp;#39;,
    paths: {
        jQuery      : &amp;#39;//ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min&amp;#39;,
        app         : &amp;#39;app.min&amp;#39;
    },
    shim: {
        &amp;#39;app&amp;#39;       : {
            deps    : [&amp;#39;jQuery&amp;#39;]
        }
    }
});
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;moment.js&lt;/h3&gt;
&lt;p&gt;Another example from the uptimey project is moment.js. Moment allows anyone to easily work with dates. We all know dates and formatting them can be a hassle, that&amp;#39;s why moment.js is a must have if you&amp;#39;re planning on working with dates.&lt;/p&gt;
&lt;h3&gt;Segment.com analytics&lt;/h3&gt;
&lt;p&gt;Instead of using good old fashion Google Analytics or GoSquared, I&amp;#39;m using the services provided by &lt;a href=&quot;https://segment.com&quot;&gt;segment.com&lt;/a&gt; because they allow me to integrate almost any tracking service by adding just a single script. Using only a single script and sending all the params through that, I can hook up things like Pingdom and Mixpanel, that allow me to visualise how things are going.&lt;/p&gt;
&lt;h2&gt;Structuring&lt;/h2&gt;
&lt;p&gt;I spent a lot of time thinking about a projects structure and how to best implement it. I finally came to the bellow formula after many hours of trail and error.&lt;/p&gt;
&lt;h3&gt;Jade (Pug) structuring&lt;/h3&gt;
&lt;p&gt;In terms of structuring the templates, I usually use this type of structure:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;footer.pug
head.pug
index.pug
layout.pug
meta.pug
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The footer file contains the analytics, require.js scripts and sometimes the copyright info. The head file has all the CSS references. The index files ties everything together. The layout file is the most important one, because it&amp;#39;s the actual structure of the whole project. Sometimes the layout file might be the basis for other pages, if the project requires it. And last but not least the meta file has all the meta tags that the project I&amp;#39;m working on needs.&lt;/p&gt;
&lt;p&gt;All these files receive constant values from the &lt;code&gt;settings.json&lt;/code&gt; file while they&amp;#39;re compiled via Grunt.&lt;/p&gt;
&lt;h3&gt;Folder structuring&lt;/h3&gt;
&lt;p&gt;The basic folder structure that I use, is as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;- bin # the destination folder when things are compiled
 -- css
 -- img
 -- js
 index.html
- lib # the source folder contains all the files that will be compiled
 -- controllers # files that define what the app can do
 -- helpers # files that contain functions that I use in multiple places
 -- models # all the files for server side scripting
 -- style # all the Sass files
 -- views # all the Pug files
 settings.json
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Deploy&lt;/h2&gt;
&lt;p&gt;The deploy part of this workflow I&amp;#39;ve only just finished perfecting. When I discovered how useful &lt;a href=&quot;https://travis-ci.org/&quot;&gt;Travis CI&lt;/a&gt; can be, I stopped searching for an alternative. I was able, using a single configuration file, like the example bellow, to test and deploy in a matter of minutes.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;env:
  global:
  - ENCRYPTION_LABEL:
  - COMMIT_AUTHOR_EMAIL: &amp;quot;your@email.here&amp;quot;
language: node_js
node_js:
  - &amp;quot;5&amp;quot;
  - &amp;quot;4&amp;quot;
  - &amp;quot;0.12&amp;quot;
  - &amp;quot;0.10&amp;quot;
before_install: 
  - npm install -g grunt-cli
  - gem install sass
install: npm install
before_script: grunt
after_success: 
  - chmod a+x deploy.sh
  - ./deploy.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above configuration is just an example that I&amp;#39;ve used on multiple occasions. You should try modifying the above params and see how they best work for you.&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll notice that after the build is finished I run a script for deploy. That script will deploy the project, in this case to Github pages, if all tests have passed successfully. You can find an example of a &lt;code&gt;deploy.sh&lt;/code&gt; &lt;a href=&quot;https://github.com/stefanbc/arca/blob/master/deploy.sh&quot;&gt;here&lt;/a&gt;. Basically what it does is, it will clone the repo into the Travis CI VM and then replace the files in the &lt;code&gt;gh-pages&lt;/code&gt; branch with the ones from the &lt;code&gt;bin&lt;/code&gt; folder and then push the updated files to Github without me having to intervene. You can add anything you want to the &lt;code&gt;deploy.sh&lt;/code&gt; file so you can deploy to your choice of environment.&lt;/p&gt;
&lt;p&gt;If you want a more in-depth look on how that script works, have a look &lt;a href=&quot;https://gist.github.com/domenic/ec8b0fc8ab45f39403dd&quot;&gt;here&lt;/a&gt;, at this brilliant tutorial, where the whole process is explained.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I hope this article will be the basis for a discussion that we can all contribute to. I&amp;#39;m saying this because, many beginners, when starting in our field don&amp;#39;t have the slightest idea where to start. So with this article I&amp;#39;m hoping to get people to share there own workflows and development stacks so that we can all benefit and improve. If you&amp;#39;ve written an article that describes your flow, hit me up &lt;a href=&quot;https://twitter.com/stefanbc&quot;&gt;@stefanbc&lt;/a&gt;, I would love to read it.&lt;/p&gt;
&lt;p&gt;In a future article I&amp;#39;ll describe my hardware stack and the way I set up my code editor. but until then code long and prosper!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;http://guillaumekurkdjian.com&quot;&gt;Guillaume Kurkdjian&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>project</category><category>development</category><category>workflow</category><category>process</category><category>stack</category><category>dependencies</category><category>deployment</category><category>coffescript</category><category>languages</category><category>javascript</category><category>sass</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/fwm6qS5.gif" length="0" type="image/gif"/></item><item><title>Just Another Cluster #4</title><link>https://stefancosma.xyz/2016/12/27/just-another-cluster-4</link><guid isPermaLink="true">https://stefancosma.xyz/2016/12/27/just-another-cluster-4</guid><description>Issues #4 - I&apos;m gathering stuff, making a list, writing a few words about each one of them and then sharing with the world.</description><pubDate>Tue, 27 Dec 2016 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;It&amp;#39;s that time again, when I post interesting links / articles / tools.&lt;/p&gt;
&lt;h3&gt;This is issue number #4.&lt;/h3&gt;
&lt;p&gt;If you&amp;#39;ve read the previous ones you might have noticed that I have changed the title of the series from Weekly Cluster to Just Another Cluster. The reason behind this is that I don&amp;#39;t have time to post on a weekly basis, so I set up an IFTT applet that sends me an email every now and then with stuff I added to Buffer or Pocket. Once I have a good amount of interesting stuff to share I&amp;#39;ll add them to an article and post it.&lt;/p&gt;
&lt;p&gt;If you find any interesting tools or articles that I might have missed, let me know &lt;a href=&quot;https://twitter.com/stefanbc&quot;&gt;@stefanbc&lt;/a&gt; I&amp;#39;ll share them in the next cluster.&lt;/p&gt;
&lt;p&gt;So, here are some interesting links and articles!&lt;/p&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://csswizardry.com/2016/12/css-shorthand-syntax-considered-an-anti-pattern/&quot;&gt;CSS Shorthand Syntax Considered an Anti-Pattern&lt;/a&gt;&lt;br&gt;Harry Roberts talks about why shorthand CSS syntax is bad when it’s affecting properties that you don’t actually need to modify.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://paragonie.com/blog/2015/08/you-wouldnt-base64-a-password-cryptography-decoded&quot;&gt;You Wouldn&amp;#39;t Base64 a Password - Cryptography Decoded&lt;/a&gt;&lt;br&gt;This article serves as a good introduction to cryptography concepts, so read it!&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://aerotwist.com/blog/when-everything-is-important-nothing-is/&quot;&gt;When everything&amp;#39;s important, nothing is!&lt;/a&gt;&lt;br&gt;Do libraries and frameworks prioritise components on boot? If so, how, and if not what can we do? That is the question this articles tries to answer.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=af4ZQJ14yu8&quot;&gt;Why Inline SVG is Best SVG&lt;/a&gt;&lt;br&gt;This video by the guys over at Front End Center will try to explain why inline SVG is better than any another form of SVG.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://hackernoon.com/who-said-javascript-easy-f4a1d5b399b8#.ig3j1ega0&quot;&gt;Who said javascript was easy?&lt;/a&gt;&lt;br&gt;To paraphrase the author of the article here’s a few tricks and traps that javascript beginners should probably know of.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://css-tricks.com/difference-between-types-of-css-variables/&quot;&gt;What is the difference between CSS variables and preprocessor variables?&lt;/a&gt;&lt;br&gt;Chris Coyier explains the difference between native CSS variables and the ones you would use within Sass or LESS.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://x-team.com/2016/12/forc-fear-of-removing-css/&quot;&gt;FORC: The Fear of Removing CSS&lt;/a&gt;&lt;br&gt;There is a genuine fear of removing CSS from legacy code. I have it and I believe most of front-end developers I know have it. This article tries to remove that fear.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://medium.com/@TebbaVonMathenstien/a-lifetime-of-learning-to-code-df1a9889c403#.qbflvmnpa&quot;&gt;A Lifetime of Learning to Code&lt;/a&gt;&lt;br&gt;The title is pretty self explanatory. You should definitely check out the article.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.w3.org/Style/CSS20/&quot;&gt;20 Years of CSS&lt;/a&gt;&lt;br&gt;20 years of CSS, people! 20 ... years! I&amp;#39;ve been working with it for about 8 years and it&amp;#39;s been a hell of a ride since there&amp;#39;s so much to lear and so little time to do it.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://24ways.org/2016/front-end-developers-are-information-architects-too/&quot;&gt;Front-End Developers Are Information Architects Too&lt;/a&gt;&lt;br&gt;As the author already said this article isn’t about what you may consider an information architect to be: someone in the user-experience field, who maybe studied library science, and who talks about taxonomies.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://benediktmeurer.de/2016/12/16/the-truth-about-traditional-javascript-benchmarks/&quot;&gt;The truth about traditional JavaScript benchmarks&lt;/a&gt;&lt;br&gt;Another self explanatory title. The ideas and statements in this article are very valid and worth checking out.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.smashingmagazine.com/2016/12/front-end-performance-checklist-2017-pdf-pages/&quot;&gt;Front-End Performance Checklist 2017 (PDF, Apple Pages)&lt;/a&gt;&lt;br&gt;Vitaly Friedman talks about front-end performance and shares with all of us a wide array of useful things that we should all consider when we think about performance.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://medium.com/@twholman/memories-from-six-years-of-open-source-c4f213f5def8#.hoic97sft&quot;&gt;Memories from six years of open source.&lt;/a&gt;&lt;br&gt;I joined Github in 2011 and it has been an amazing tool and resource hub. This article will go through what 6 years of open source mean for anyone involved.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;http://guillaumekurkdjian.com/&quot;&gt;Guillaume Kurkdjian&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>links</category><category>articles</category><category>sharing</category><category>useful</category><category>development</category><category>css</category><category>just-another-cluster</category><category>issue</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/c68iK4V.gif" length="0" type="image/gif"/></item><item><title>Changing teams - the good, the bad and the ... future</title><link>https://stefancosma.xyz/2016/08/28/changing-teams-good-bad-future</link><guid isPermaLink="true">https://stefancosma.xyz/2016/08/28/changing-teams-good-bad-future</guid><description>I&apos;ll explain what decisions you&apos;ll have to face and what things to watch out when you&apos;re changing teams.</description><pubDate>Sun, 28 Aug 2016 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;So, you decided that it&amp;#39;s time to change teams, and by that I mean you decided to either leave your current job and pursue another one or within the same company you&amp;#39;re switching teams.&lt;/p&gt;
&lt;p&gt;Whatever maybe the case, you&amp;#39;ll be faced with some decisions and things that you&amp;#39;ll need to deal with. If you&amp;#39;ve done this before then you know what I&amp;#39;m talking about and maybe you&amp;#39;ll want to continue reading about my experience. If, on the other hand, this is the first time you&amp;#39;re doing this then I&amp;#39;ll try to explain what challenges you&amp;#39;ll face and what things to watch out for, from my own experience.&lt;/p&gt;
&lt;p&gt;As was my case, I had to part ways with a team that I&amp;#39;ve worked with, for the past few years.&lt;/p&gt;
&lt;p&gt;So what are the things that you&amp;#39;ll face when you&amp;#39;re switching teams?&lt;/p&gt;
&lt;h2&gt;The good&lt;/h2&gt;
&lt;p&gt;The best part of changing teams is that you&amp;#39;ll start working on new and exciting things, as part of your new team. You&amp;#39;ll have a fresh start on how you think, implement things and communicate with others.&lt;/p&gt;
&lt;p&gt;As part of the transition process you&amp;#39;ll have a short window (maybe more) to review all the things that you&amp;#39;ve built with your old team. Why is this a good thing? Self analysis is always a good way to improve your abilities and to improve yourself.&lt;/p&gt;
&lt;p&gt;During my transition period, I reflected on all the great things that I achieved during the years working with the former team. From establishing development workflows, to learning how to maintain certain systems, to introducing new technologies and apps into the flow of things. I had a feeling of pride in all the work that I did. If doesn&amp;#39;t matter what things you achieved or didn&amp;#39;t with your former team, as long as you have respect for what you did.&lt;/p&gt;
&lt;p&gt;Another great thing to look forward to, is you&amp;#39;ll get to work on exciting new things, this of course may include working with new, up to date, technologies, that you haven&amp;#39;t worked with before.&lt;br&gt;I&amp;#39;m mentioning this because from my own experience, during my time with my previous team, I worked with outdated technologies, that in most cases weren&amp;#39;t the best way to implement things, but I made the best of it and adapted to the situation.&lt;/p&gt;
&lt;h2&gt;The bad&lt;/h2&gt;
&lt;p&gt;As with all things in life, there are aspects that you can&amp;#39;t avoid and you&amp;#39;ll need to deal with before you can move on.&lt;/p&gt;
&lt;p&gt;For example, I was in charge of certain workflows and systems within my old company. One of the downsides that I faced when I switched teams was that the transition process involved a lot of knowledge exchange. Of course this can be a good thing because it will give you an opportunity to review all that you know. Keep in mind that this process can and will be very time consuming.&lt;/p&gt;
&lt;p&gt;Make sure that if you were in charge of certain workflows, when you leave, your team can handle it.&lt;/p&gt;
&lt;p&gt;But this raises another question, are you expandable? Should you be? Well it&amp;#39;s a two bladed discussion, because if you&amp;#39;re expandable then the transition process will be much easier, if you&amp;#39;re not then it&amp;#39;s a whole different cup of tea and you&amp;#39;re going to reach the above, time consuming process of exchanging knowledge.&lt;/p&gt;
&lt;h2&gt;The ... future&lt;/h2&gt;
&lt;p&gt;When if comes to the future of things then my suggestion would be to always leave a door open for future endeavours. If you&amp;#39;ve formed strong bonds with your former teammates then be confident that they can handle it when you leave. Of course this applies only if you were a non expandable part of the team.&lt;/p&gt;
&lt;p&gt;Always look forward to what comes in store, for you, next. Whether it&amp;#39;s just a small project that lasts only a couple of months or a full time position at a new startup, make sure you have a clear head when you start a new project.&lt;/p&gt;
&lt;p&gt;So in order to wrap this up, I will only leave you with this: be confident in your abilities and your knowledge, don&amp;#39;t worry to much on how you&amp;#39;ll adapt within your new team, just do your job and things will fall into place. Also keep in mind that your former team will have to overcome your absence in one way or another.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;http://guillaumekurkdjian.com/&quot;&gt;Guillaume Kurkdjian&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>work</category><category>workflow</category><category>explanation</category><category>teams</category><category>change</category><category>future</category><category>team</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/7A782z5.gif" length="0" type="image/gif"/></item><item><title>Are you bikeshedding? Probably!</title><link>https://stefancosma.xyz/2016/03/03/what-is-bikeshedding</link><guid isPermaLink="true">https://stefancosma.xyz/2016/03/03/what-is-bikeshedding</guid><description>Bikeshedding is when you argue about some meaningless thing and tend to avoid the more important issue at hand.</description><pubDate>Thu, 03 Mar 2016 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;You have no idea what I&amp;#39;m talking about, right? That&amp;#39;s because not many people use the term &lt;strong&gt;bikeshedding&lt;/strong&gt;. It&amp;#39;s not a usual term that people just throw around all the time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bikeshedding is when you argue about some meaningless thing and tend to avoid the more important issue at hand.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For example Urban Dictionary tells us this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Technical disputes over minor, marginal issues conducted while more serious ones are being overlooked. The implied image is of people arguing over what color to paint the bicycle shed while the house is not finished.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Let&amp;#39;s take the above image as an example. You see the stick men trying to dump all the water out of the sand castle but avoid the fact that 1. the castle is made of sand and 2. they have a river below their castle that floods said castle.&lt;/p&gt;
&lt;p&gt;In some ways it&amp;#39;s like &lt;strong&gt;procrastination&lt;/strong&gt;. You waste your time doing/talking about things that should not be your main focus in the first place.&lt;/p&gt;
&lt;p&gt;This is a growing issue in the tech community. I&amp;#39;ve worked on projects where the more important issues, like scalability, were overlooked because we couldn&amp;#39;t decide how many items should a query contain.&lt;/p&gt;
&lt;p&gt;So, I propose, as Chris Coyier already said in &lt;a href=&quot;https://css-tricks.com/what-is-bikeshedding/&quot;&gt;his article&lt;/a&gt;, next time you&amp;#39;re in a meeting and you see two people arguing about some meaningless thing, yell &lt;strong&gt;bikeshedding!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;http://guillaumekurkdjian.com/&quot;&gt;Guillaume Kurkdjian&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>questions</category><category>bikeshedding</category><category>rant</category><category>work</category><category>developers</category><category>community</category><category>definition</category><category>short</category><category>explanation</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/HhPi891.gif" length="0" type="image/gif"/></item><item><title>Just Another Cluster #3</title><link>https://stefancosma.xyz/2015/12/02/just-another-cluster-3</link><guid isPermaLink="true">https://stefancosma.xyz/2015/12/02/just-another-cluster-3</guid><description>I&apos;m gathering stuff, making a list, writing a few words about each one of them and then sharing with the world.</description><pubDate>Wed, 02 Dec 2015 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Well, well, if it isn&amp;#39;t that time of the week again, where I post interesting links / articles / tools and then comment upon them.&lt;/p&gt;
&lt;p&gt;If you haven&amp;#39;t read &lt;a href=&quot;/tag/weekly-cluster/&quot;&gt;the first ones&lt;/a&gt;, I suggest you do.&lt;/p&gt;
&lt;h3&gt;This is issue number #3.&lt;/h3&gt;
&lt;p&gt;As always, if you find any interesting tools or articles that I might have missed, let me know in the comments below and I&amp;#39;ll share them in the next weekly cluster.&lt;/p&gt;
&lt;p&gt;So, here are last week&amp;#39;s interesting links!&lt;/p&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/NARKOZ/hacker-scripts&quot;&gt;Hacker Scripts&lt;/a&gt;&lt;br&gt;There are lazy people but then there&amp;#39;s this guy. It kinda&amp;#39; freaks me out to be honest. I won&amp;#39;t share too many details about this link, just click it and see for yourself.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://hugogiraudel.com/2015/08/19/learning-regular-expressions-the-practical-way/&quot;&gt;Learning Regular Expressions: The Practical Way&lt;/a&gt;&lt;br&gt;Hugo Giraudel explains, with practical examples, regex. His explanations are on point and you could actually learn something from this guide.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.sitepoint.com/full-stack-developer/&quot;&gt;Being a Full Stack Developer&lt;/a&gt;&lt;br&gt;What does a being a full stack developer mean in today&amp;#39;s industry. Well it turns out you have to know a lot of things. Back in the old days, knowing PHP, SQL and HTML / CSS would have been enough, but that&amp;#39;s not the case today. Do you consider yourself a full stack developer?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://philipwalton.com/articles/do-we-actually-need-specificity-in-css/&quot;&gt;Do We Actually Need Specificity In CSS?&lt;/a&gt;&lt;br&gt;Philip Walton tries to answer the question: &amp;quot;If we lived in a world where specificity was never added to the cascade, would things be better or worse?&amp;quot;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/AllThingsSmitty/jquery-tips-everyone-should-know&quot;&gt;jQuery tips everyone should know&lt;/a&gt;&lt;br&gt;In the era of Angular, Ember and React who the hell uses jQuery anymore? A lot of people. If you have a project that requires some jQuery then check this out for a quick refresh of tips.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/AlDanial/cloc&quot;&gt;cloc - count lines of code&lt;/a&gt;&lt;br&gt;As the name already suggests, this tool will help you count lines of code from files and entire folders for a wide spectrum of languages.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://medium.com/@gokmen/scaffolding-kd-js-with-yeoman-ac2593c7ada1#.euxtn5t6c&quot;&gt;Scaffolding kd.js with Yeoman&lt;/a&gt;&lt;br&gt;Koding&amp;#39;s very own Gökmen Göksel was bored one weekend and decided to create a yeoman generator for kd.js and it’s super fancy. A little bit of background on this. At Koding we’re using our own framework to build Koding. It’s called kd.js.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.gohugo.io/&quot;&gt;Hugo - A fast and modern static website generator&lt;/a&gt;&lt;br&gt;Hugo is a really cool, fast static site generator built using Go. The creators describe it as a general-purpose website framework.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://musicforprogramming.net/&quot;&gt;musicForProgramming();&lt;/a&gt;&lt;br&gt;Bored of your Spotify playlists? Here&amp;#39;s a series of mixes intended for listening while programming to aid concentration and increase productivity (also compatible with other activities).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.thecssninja.com/browser/jsconfeu15&quot;&gt;So how does the browser actually render a website&lt;/a&gt;&lt;br&gt;Ryan Seddon explains, in this great talk, at JSConfEU 2015, how the browser actually renders your websites. Really interesting talk, you should check it out ... since ... you know ... you&amp;#39;re developing stuff for the browser.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;http://guillaumekurkdjian.com/&quot;&gt;Guillaume Kurkdjian&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>links</category><category>tools</category><category>sharing</category><category>useful</category><category>development</category><category>articles</category><category>koding</category><category>developers</category><category>music</category><category>css</category><category>browser</category><category>just-another-cluster</category><category>issue</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/c68iK4V.gif" length="0" type="image/gif"/></item><item><title>Yak shaving. A short definition!</title><link>https://stefancosma.xyz/2015/11/23/yak-shaving-a-short-definition</link><guid isPermaLink="true">https://stefancosma.xyz/2015/11/23/yak-shaving-a-short-definition</guid><description>Have you ever started to work on a task and suddenly you realised that that task required some other little task to be finished.That&apos;s yak shaving!</description><pubDate>Mon, 23 Nov 2015 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Have you ever started to work on a task and suddenly you realized that said task requires some other little task(s) to be finished beforehand. That&amp;#39;s yak shaving for you, the tl;dr version.&lt;/p&gt;
&lt;p&gt;You&amp;#39;ve probably done this multiple times and you did even realize it.&lt;/p&gt;
&lt;p&gt;Back in 90s a Ph.D. at MIT by the name of &lt;a href=&quot;http://projects.csail.mit.edu/gsb/old-archive/gsb-archive/gsb2000-02-11.html&quot;&gt;Carlin J. Vieri&lt;/a&gt; produced this term to describe&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;what you are doing when you&amp;#39;re doing some stupid, fiddly little task that bears no obvious relationship to what you&amp;#39;re supposed to be working on, but yet a chain of twelve causal relations links what you&amp;#39;re doing to the original meta-task.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Let me give you an example, that you can relate to.&lt;/p&gt;
&lt;p&gt;You&amp;#39;re working on an older project. Let&amp;#39;s say that you&amp;#39;re ready to deploy, but you suddenly realize that you forgot to set up the Digital Ocean droplet. You start setting that up, but it dawns on you that you need a certain version of PHP. Before you start downloading and setting that up you realize that there are some security issues that need addressing with your droplet.&lt;/p&gt;
&lt;p&gt;And thus you find yourself in an ongoing spiral of never ending little tasks that divert you from the main task. Another comparison would be something like side quests in an RPG type game.&lt;/p&gt;
&lt;p&gt;Why do we do this?&lt;/p&gt;
&lt;p&gt;I think it has to do with the human nature. We&amp;#39;re not a species that does things instinctively. We don&amp;#39;t know what things can come up at any point in time. At least that&amp;#39;s how I see things. Any other thoughts on this?&lt;/p&gt;
&lt;p&gt;Until next time, code long and proper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>task</category><category>development</category><category>definition</category><category>short</category><category>explanation</category><category>mystery</category><category>human-nature</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/ibaDjk7.gif" length="0" type="image/gif"/></item><item><title>Just Another Cluster #2</title><link>https://stefancosma.xyz/2015/11/21/just-another-cluster-2</link><guid isPermaLink="true">https://stefancosma.xyz/2015/11/21/just-another-cluster-2</guid><description>I&apos;m gathering stuff, making a list, writing a few words about each one of them and then sharing with the world.</description><pubDate>Sat, 21 Nov 2015 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;It&amp;#39;s that time of the week again, where I post interesting links / articles / tools and then comment upon them. This is issue number #2. If you haven&amp;#39;t read &lt;a href=&quot;/2015/11/09/weekly-cluster-1/&quot;&gt;the first one&lt;/a&gt;, I suggest you do.&lt;br&gt;As always, if you find any interesting tools or articles that I might have missed, let me know in the comments below and I&amp;#39;ll share them in the next weekly cluster.&lt;/p&gt;
&lt;p&gt;Without further adieu here are last week&amp;#39;s interesting links!&lt;/p&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://hacks.mozilla.org/2015/11/firefox-os-2-5-developer-preview-an-experimental-android-app/&quot;&gt;Firefox OS 2.5 Developer Preview, an experimental Android app&lt;/a&gt;&lt;br&gt;The guys and gals over at Mozilla have launched the Firefox OS in the form of an Android app. Basically you can now get a taste of the Firefox OS without the hassle of actually buying a new phone.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.projectoxford.ai/emotion&quot;&gt;Microsoft Project Oxford Emotion APIs&lt;/a&gt;&lt;br&gt;This one is actually really cool. Someone at Microsoft decided one day, that it&amp;#39;s about time to find out what their customers actually feel when buying Microsoft products. This set of APIs allows anyone to detect what emotion is present in a photo. How cool is that!?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://koding.com/Hackathon&quot;&gt;Koding&amp;#39;s Global Virtual Hackathon 2015&lt;/a&gt;&lt;br&gt;Between December 12th and 13th Koding is hosting the worlds largest virtual hackathon. Last year there were around 60k participants, this year that number will be left in the dust. Did I mention, the grand prize is 100k? Yeah, that too.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://medium.com/@kentcdodds/please-don-t-commit-commented-out-code-53d0b5b26d5f&quot;&gt;Please, don’t commit commented out code&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;https://twitter.com/kentcdodds&quot;&gt;Kent Dodds&lt;/a&gt; explains why it&amp;#39;s bad practice to commit commented out code. The explanation won&amp;#39;t surprise you, because it makes sense.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://anders.unix.se/2015/10/28/screenshots-from-developers--unix-people-2002/&quot;&gt;Screenshots from developers &amp;amp; Unix people (2002)&lt;/a&gt;&lt;br&gt;Curios how famous developer&amp;#39;s desktops looked like, back in the day? This very insightful article will showcase just that. How does your daily screen look like?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://css-tricks.com/dark-matter-what-it-is-and-how-we-all-contribute-to-it/&quot;&gt;Dark matter&lt;/a&gt;&lt;br&gt;No, we&amp;#39;re not talking about the hypothetical kind of matter that cannot be seen with telescopes but accounts for most of the matter in the universe, we&amp;#39;re talking about the dark matter developers that don&amp;#39;t read a lot of blogs, they never write blogs, they don&amp;#39;t go to user groups, they don&amp;#39;t tweet or facebook, and you don&amp;#39;t often see them at large conferences. Where are these dark matter developers online?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.toptal.com/open-source/developers-guide-to-open-source-licenses&quot;&gt;Developer’s Guide to Open Source Licenses&lt;/a&gt;&lt;br&gt;You&amp;#39;re starting a new project and you want it to be open source, but you&amp;#39;re not sure about the kind of license to choose. Worry not, this handy guide will help you in your quest for open source awesomeness.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://vanseodesign.com/web-design/how-to-work-with-svg-text/&quot;&gt;How to work with SVG text&lt;/a&gt;&lt;br&gt;Steven Bradley explains why working with SVG text is the best of both worlds. On one hand it’s rendered like other graphic elements and on the other hand it&amp;#39;s packaged as XML character data, which means it’s real text.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://remysharp.com/2015/10/14/the-art-of-debugging&quot;&gt;The art of debugging&lt;/a&gt;&lt;br&gt;In this article, Remy Sharp explains why it&amp;#39;s crucial to learn every tool that&amp;#39;s available to use, use it as you need it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://medium.com/@Heydon/things-to-avoid-when-writing-css-1a222c43c28f#.skyete7zc&quot;&gt;Things to avoid when writing CSS&lt;/a&gt;&lt;br&gt;Here&amp;#39;s a list of things that you should avoid when writing CSS. From nesting in Sass to multiple files, &lt;a href=&quot;https://twitter.com/heydonworks&quot;&gt;@heydonworks&lt;/a&gt; explains why.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/JuanPotato/Legofy&quot;&gt;Legofy&lt;/a&gt;&lt;br&gt;This neat little tool will transform any image to make it look as if it&amp;#39;s made out of 1x1 LEGO blocks. It&amp;#39;s made in Python.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://reactcheatsheet.com/&quot;&gt;React Cheat Sheet&lt;/a&gt;&lt;br&gt;React.js is the hottest trend now, and in case you haven&amp;#39;t tried it yet, I suggest you do. If you ever get stuck this useful cheatsheet should help.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.smashingmagazine.com/2015/10/es6-whats-new-next-version-javascript/&quot;&gt;ECMAScript 6 (ES6): What’s new in the next version of JavaScript&lt;/a&gt;&lt;br&gt;You heard of lot of rumours, but you&amp;#39;re not sure what new things are coming to the newest version of JavaScript. Checkout this article to put aside all those rumours.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;http://guillaumekurkdjian.com/&quot;&gt;Guillaume Kurkdjian&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>links</category><category>tools</category><category>sharing</category><category>useful</category><category>development</category><category>articles</category><category>firefox</category><category>koding</category><category>microsoft</category><category>just-another-cluster</category><category>issue</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/c68iK4V.gif" length="0" type="image/gif"/></item><item><title>Basic security. Let&apos;s talk about that!</title><link>https://stefancosma.xyz/2015/11/16/basic-security</link><guid isPermaLink="true">https://stefancosma.xyz/2015/11/16/basic-security</guid><description>As someone who has been hacked, I&apos;ve learned a thing or two about how to deal with certain things. So, how does one get on the path of a secure web app?</description><pubDate>Mon, 16 Nov 2015 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;Disclaimer: I&amp;#39;m not a security expert, nor do I pretend to be one. This article just highlights some of the things that I&amp;#39;ve learned over the years, when it comes to basic security measures. I cannot be held responsible for the bad things that could happen to your app.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When I started out as a developer I didn&amp;#39;t take into consideration the security aspects of my websites / apps. As most of my developer friends, I just loved to code.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s the same story with every other new developer out there. We can safely assume that when it comes to building your first app or website, as a new developer, you won&amp;#39;t think about basic security measures, because you ... still trust the world.&lt;/p&gt;
&lt;p&gt;As someone who has been hacked, I&amp;#39;ve learned a thing or two about how to deal with certain things. So, how does one get on the path of a secure web app? Below are the do&amp;#39;s and don&amp;#39;ts of what you should consider when building / setting up your app.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Don&amp;#39;t ...&lt;/h2&gt;
&lt;h3&gt;... save passwords in clear text in the database&lt;/h3&gt;
&lt;p&gt;This is quite common among new developers, even professional ones. I&amp;#39;ve encountered cases where passwords were saved in clear text in the database and everyone had the same password, with no difference between them whatsoever.&lt;/p&gt;
&lt;p&gt;Imagine someone suddenly gains access to your database, either forcefully or you&amp;#39;ve added a new developer to the team. You have to be very trustworthy to actually let people see that information. They could use that information to gain access to other services.&lt;/p&gt;
&lt;p&gt;If you continue reading you&amp;#39;ll learn how you can solve this and why this is a bad habit.&lt;/p&gt;
&lt;h3&gt;... use admin as the default username&lt;/h3&gt;
&lt;p&gt;When you deploy your website or app, make sure you don&amp;#39;t have the default username, or the first username saved in the database, as &lt;code&gt;admin&lt;/code&gt;. Just make it to something else. You can&amp;#39;t imagine how many bots I have encountered that targeted the &lt;code&gt;admin&lt;/code&gt; username and tried to forcefully break into the app.&lt;/p&gt;
&lt;p&gt;Someone can basically try to guess the password, since assuming the default username is &lt;code&gt;admin&lt;/code&gt;, taking every combination possible and filling the input field with it, is really easy. Imagine how many server calls that takes and how it can affect your server&amp;#39;s performance. In some cases it can even take your server offline.&lt;/p&gt;
&lt;h3&gt;... use the default table prefix&lt;/h3&gt;
&lt;p&gt;When it comes to websites or apps built using some form of CMS / e-commerce system, it&amp;#39;s bad practice to use the default prefix when making the initial setup of the app.&lt;/p&gt;
&lt;p&gt;If, for example, your app is vulnerable to &lt;a href=&quot;https://en.wikipedia.org/wiki/SQL_injection&quot;&gt;SQL injection&lt;/a&gt; then an attacker can easily target sensitive tables in your database since they know the structure of your database and the prefix you&amp;#39;re using.&lt;/p&gt;
&lt;p&gt;My suggestion is to always use a different prefix, then the default one. If you&amp;#39;re using something like WordPress, that the default prefix should be changed to something custom to the app you&amp;#39;re currently building.&lt;/p&gt;
&lt;h3&gt;... use O (zero) as the first user ID&lt;/h3&gt;
&lt;p&gt;It&amp;#39;s basically the same situation as the previous one. An attacker could possibly take control of the first user and rake havoc in your database and your app, because we all know that, in most cases the first user is also the admin and the one that has the biggest security clearance.&lt;/p&gt;
&lt;h3&gt;... use weak passwords&lt;/h3&gt;
&lt;p&gt;This should be common practice for everything not just the apps you&amp;#39;re building, but the ones that you use as well. Enforcing strong passwords for all your users can increase your security tenfold.&lt;/p&gt;
&lt;p&gt;Suggesting they use a password generator before they sign up or you generating a strong for them should to the trick.&lt;/p&gt;
&lt;p&gt;This is a much broader discussion, that I&amp;#39;m not going to tackle in this article, however below there are a few suggestions on how you can fix this issue. My suggestion is to implement at least some of them.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Do ...&lt;/h2&gt;
&lt;h3&gt;... enforce folder / file writing permissions&lt;/h3&gt;
&lt;p&gt;This is one of the most basic things you can do. Make sure your folders / files are owned by the right user:group combo and have the proper write permissions. Here is &lt;a href=&quot;http://learn.koding.com/guides/understanding-file-permissions/&quot;&gt;a great guide&lt;/a&gt; on how you can get started with that.&lt;/p&gt;
&lt;p&gt;If your files and folders don&amp;#39;t have the right permissions, then an attacker would be able to inject problematic scripts that could disrupt your setup and could endanger other users.&lt;/p&gt;
&lt;p&gt;My suggestion, for starters, is to use 644 for files and 755 for folders, as write permissions, if you&amp;#39;re using a Linux based system.&lt;/p&gt;
&lt;h3&gt;... use encrypted passwords&lt;/h3&gt;
&lt;p&gt;I&amp;#39;ve already explained what can happen when you save passwords in clear text. Now, I&amp;#39;m telling you, how you can solve that issue, because when it comes to passwords, you should always, always encrypt then, however you want, just do it.&lt;/p&gt;
&lt;p&gt;I hope I don&amp;#39;t need to enumerate why this is so important, just &lt;a href=&quot;https://www.sans.org/reading-room/whitepapers/authentication/clear-text-password-risk-assessment-documentation-113&quot;&gt;read this&lt;/a&gt;. But I can advise you, on how you can enforce a basic encryption system.&lt;/p&gt;
&lt;p&gt;If, for example, you&amp;#39;re using PHP you can use the &lt;a href=&quot;http://php.net/manual/en/function.hash.php&quot;&gt;hash function&lt;/a&gt; to encrypt the passwords. This is the first and most basic step. The next suggestion continues to improve upon this one.&lt;/p&gt;
&lt;h3&gt;... use a salting method for passwords&lt;/h3&gt;
&lt;p&gt;As mentioned above this is an extra step, to ensure that the passwords you save in your database are kept clear of prying eyes. This method is quite common and really easy to implement.&lt;/p&gt;
&lt;p&gt;The Wiki explanation states the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In cryptography, a salt is random data that is used as an additional input to a one-way function that hashes a password or passphrase. The primary function of salts is to defend against dictionary attacks versus a list of password hashes and against pre-computed rainbow table attacks.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In case you didn&amp;#39;t understand what the above words mean then here is the explanation for web applications.&lt;/p&gt;
&lt;p&gt;You can implement this by generating a random string, that you have saved somewhere in a private file, you can take that string and concatenate it to the password, before you save it in the database, and then hash the whole thing. When you want to check if the user filled in the correct password you use the random string, that you generated, and you have saved in a secure file, add it to the value you get from the input field, hash it and compare it to the password that you have saved, in the database, for that user.&lt;/p&gt;
&lt;p&gt;The benefits of using a method like this one is that it takes a very long time to crack a password using conventional methods.&lt;/p&gt;
&lt;h3&gt;... escape your data&lt;/h3&gt;
&lt;p&gt;Always, and I mean always escape your data, weather it&amp;#39;s data that you output or something that you save in your database. You don&amp;#39;t want malicious data saved in your database that in return you output to your users.&lt;/p&gt;
&lt;p&gt;Why is this so important? The most common attack, if you don&amp;#39;t escape your data, is an XSS attack. XSS will allow an attacker to inject client-side scripts into your app. When users view that they&amp;#39;ll get injected with whatever is in those scripts.&lt;/p&gt;
&lt;p&gt;Based on the language and database of your choosing, a method will be available that can help you achieve this. If you&amp;#39;re using PHP, google for &lt;code&gt;php escape&lt;/code&gt; and you&amp;#39;ll find multiple methods.&lt;/p&gt;
&lt;h3&gt;... enable 2FA&lt;/h3&gt;
&lt;p&gt;Or if you prefer the long version, two factor authentication. This is a bit in the realm of high security apps. You don&amp;#39;t really need to implement this right away, when building your app, but make it so that it&amp;#39;s easier to integrate later on. So, what is 2FA?&lt;/p&gt;
&lt;p&gt;It&amp;#39;s an extra layer of security that requires not only a password and username but also something that only, the user has, for eg. a piece of information only they should know or have immediately on hand.&lt;/p&gt;
&lt;p&gt;Since we&amp;#39;re talking about web apps, the most common practice of implementing 2FA is to generate a QR code that contains some data. That data is saved in a token app that generates a one time token.&lt;br&gt;Each time a user fills in their username and password they should also input the token generated by the authenticator app. It&amp;#39;s basically a second password that is generated on the go by the user and only they can see it. The system doesn&amp;#39;t know it, so if an attacker tries to break in they&amp;#39;ll have another layer to bypass.&lt;/p&gt;
&lt;p&gt;This can also be achieved either by sending a token via SMS, via a phone call or via email. It can also be a token generated by some piece of hardware or the one that I described, a token generated by a piece of software.&lt;/p&gt;
&lt;p&gt;What can be the main benefit of this? Well, the use of two distinct authentication factors can eliminate security concerns, that a system admin may have, around granting access based on a single, knowledge-based factor.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;So there you have it. A list of do&amp;#39;s and don&amp;#39;ts that you can follow when you build your app. Now, don&amp;#39;t get me wrong, I know there are a lot more things you can implement, that I might have missed, but I just wanted to write a short overview of the things that you could implement inside your app. Should you consider them? Yes. Should you be paranoid about security? I would say, no. Or at least, not from the very beginning.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll just leave you with something to think about before I wrap this article up.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Distrust and concern are the parents of security.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;~ Benjamin Franklin&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Until next time, stay secure and don&amp;#39;t forget to code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;http://guillaumekurkdjian.com/&quot;&gt;Guillaume Kurkdjian&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>security</category><category>passwords</category><category>basics</category><category>developers</category><category>wordpress</category><category>apps-tag</category><category>encryption</category><category>2fa</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/M34bDXk.gif" length="0" type="image/gif"/></item><item><title>Just Another Cluster #1</title><link>https://stefancosma.xyz/2015/11/09/just-another-cluster-1</link><guid isPermaLink="true">https://stefancosma.xyz/2015/11/09/just-another-cluster-1</guid><description>I&apos;m gathering stuff, making a list, writing a few words about each one of them and then sharing with the world.</description><pubDate>Mon, 09 Nov 2015 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Welcome to the first ever issue of the &lt;strong&gt;Weekly Cluster&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I decided that it&amp;#39;s time to put together a list of useful tools, interesting articles, that I find during a week. Weather it&amp;#39;s a cool new CSS tool, a wonderfully written article by @SaraSoueidan or a masterfully crafted pen by @anatudor, I&amp;#39;m going to share it.&lt;/p&gt;
&lt;p&gt;This is how we&amp;#39;re going to do this: I&amp;#39;m going to gather the stuff I mentioned above, make a list, write a few words about each one of them and then share it with the world. You don&amp;#39;t have to subscribe to any newsletter or any of that jazz.&lt;/p&gt;
&lt;p&gt;If you, for example find any interesting tools or articles that I might have missed, let me know in the comments below and I&amp;#39;ll share them in the next weekly cluster.&lt;/p&gt;
&lt;p&gt;Without further adieu here are last week&amp;#39;s interesting links!&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://blogs.adobe.com/dreamweaver/2015/09/css-vs-svg-shapes-and-arbitrarily-shaped-ui-components.html&quot;&gt;CSS vs. SVG: Shapes and Arbitrarily-Shaped UI Components&lt;/a&gt;&lt;br&gt;In this article Sara Soueidan explains a few techniques for creating arbitrarily-shaped UI components using CSS properties and SVG’s capabilities, and a mix of both!&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ma.ttias.be/firefox-nightly-starts-marking-login-forms-in-http-as-insecure/&quot;&gt;Firefox Nightly starts marking login-forms in HTTP as insecure&lt;/a&gt;&lt;br&gt;Mattias Geniar shares some insight into why you should switch to HTTPs if your site has any kind of login section because now Firefox is giving you even more of an incentive to do so.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://medium.com/design-optimizely/diving-deep-into-svg-animations-1e8c1b759b85&quot;&gt;Diving deep into SVG animations&lt;/a&gt;&lt;br&gt;Daniel O&amp;#39;Connor is going undercover to unmask all the secrets of SVG animations.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://css-tricks.com/gulp-for-beginners&quot;&gt;Gulp for Beginners&lt;/a&gt;&lt;br&gt;If you&amp;#39;re a beginner with Gulp (you know, that tool all your developer friends now use to optimise their .js files) then you might want to checkout this great intro tutorial on CSS Tricks.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://dev.windows.com/en-us/microsoft-edge/tools/vms/mac/&quot;&gt;Virtual Machine to test MS Edge and IE6 through IE11&lt;/a&gt;&lt;br&gt;I&amp;#39;m not sure why I&amp;#39;m sharing this one, since Edge is still a work in progress and everybody dislikes IE. But hey, maybe someone out there will find this useful in some way or another.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://isitmaintained.com/&quot;&gt;Is it maintained?&lt;/a&gt;&lt;br&gt;&lt;em&gt;... that is the questions: Whether &amp;#39;tis nobler in the mind to suffer - The slings and arrows of outrageous fortune,&lt;/em&gt; Check if open source projects are still maintained.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.codeschool.io/2015/09/11/how-to-keep-web-animations-from-slowing-you-down/&quot;&gt;How to Keep Web Animations From Slowing You Down?&lt;/a&gt;&lt;br&gt;Have you ever thought about how you can keep web animations from slowing your app down? Jordan Wade has and he come to some interesting conclusions that you might want to consider when building or rebuilding your app.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://zenorocha.github.io/clipboard.js/&quot;&gt;clipboard.js&lt;/a&gt;&lt;br&gt;Is a modern approach to copy text to clipboard because it uses no Flash, no dependencies and it&amp;#39;s just 2kb. Yes, just 2kb. You know what else is 2kb, your old dial-up connection.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ericdouglas.github.io/2015/09/27/checklist-for-your-new-open-source-javascript-project/&quot;&gt;Checklist for your new Open Source JavaScript Project&lt;/a&gt;&lt;br&gt;So you&amp;#39;re building an open source JS project. Have you thought about everything? What about creating a package.json file or what about adding a .gitignore? I thought so. This checklist might come in handy.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.nateberkopec.com/2015/10/07/frontend-performance-chrome-timeline.html&quot;&gt;Ludicrously Fast Page Loads - A Guide for Full-Stack Devs&lt;/a&gt;&lt;br&gt;Your website is slow, but the backend is fast. This guide will teach you how to diagnose performance issues on the frontend of your site.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://css-tricks.com/styling-a-server-generated-file-directory/&quot;&gt;Styling a Server-Generated File Directory&lt;/a&gt;&lt;br&gt;One word, Apaxy. Also I have a &lt;a href=&quot;https://github.com/stefanbc/Koding-Theme-Apaxy&quot;&gt;project&lt;/a&gt; for this.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://mo.github.io/2015/10/19/chrome-devtools.html&quot;&gt;Chrome Devtools Tips &amp;amp; Tricks&lt;/a&gt;&lt;br&gt;You think you know how to use Chrome DevTools? Think again. For eg. did you know that you can jump to a specific file, by name, using ctrl-p?&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://radek.io/2015/10/20/httpie/&quot;&gt;httpie: A CLI http client that will make you smile&lt;/a&gt;&lt;br&gt;httpie is a command-line http client, much like cURL or wget. Written entirely in Python (using requests for the backend and pygments for syntax highlighting) and above that it&amp;#39;s working on multiple platforms.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;http://guillaumekurkdjian.com/&quot;&gt;Guillaume Kurkdjian&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>links</category><category>tools</category><category>sharing</category><category>useful</category><category>development</category><category>articles</category><category>just-another-cluster</category><category>issue</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/c68iK4V.gif" length="0" type="image/gif"/></item><item><title>Switching domains. Is it worth it?</title><link>https://stefancosma.xyz/2015/10/23/switching-domains</link><guid isPermaLink="true">https://stefancosma.xyz/2015/10/23/switching-domains</guid><description>I recently switched domains. Here&apos;s my story on the whole matter. Is it worth it? Does switching domains impact you in any way?</description><pubDate>Fri, 23 Oct 2015 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This past month, my personal website has been offline. The domain expired and I didn&amp;#39;t do anything to prevent this from happening.&lt;/p&gt;
&lt;p&gt;There are multiple reasons why I ignored that aspect.&lt;/p&gt;
&lt;p&gt;The most important one was that, the domain provider doesn&amp;#39;t have a business plan that includes customer focus and satisfaction. In other words, they do not make sure the customer is always informed and up to date with everything that happens to their account.&lt;/p&gt;
&lt;p&gt;For eg. I did not receive any prior notice that the domain will expire soon. The only thing I received was a notice that stated the following: your domain has expired, we tried contacting you via the phone number you provided in your account, and you need to pay this X sum of money in order to get it back.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/start rant&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;They did not try to call me. I have my phone 24/7 on and next to me. I did not receive any call from them.&lt;/p&gt;
&lt;p&gt;Secondly, just by providing your customers with a bill after something expired, without any prior notice, is not a good business tactic.&lt;/p&gt;
&lt;p&gt;I know from experience that, people don&amp;#39;t like it when you don&amp;#39;t send them updates regarding things they&amp;#39;re paying for.&lt;/p&gt;
&lt;p&gt;So, I&amp;#39;m assuming, that their business model is not focused on costumers, at all.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/end rant&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;After that whole fiasco was over, I still had a droplet that was in a dire need of a domain.&lt;/p&gt;
&lt;p&gt;While I was on the lookout for a new domain name, I started turning off all the services that kept my website in a working condition.&lt;/p&gt;
&lt;p&gt;This means that I turned off the droplet, cleared out the nameservers, turned off all the monitoring services that I have active (for some reason I&amp;#39;m using multiple ones, instead of just one) and paused the mailing system.&lt;/p&gt;
&lt;p&gt;So powering down everything was easy. This impacted a lot of things. For starters, from an SEO point of view, everything went haywire. It was like my website went of the grid.&lt;/p&gt;
&lt;p&gt;This was the situation for about a month or so. Then, about a week ago, I came across this domain, and following in the footsteps of Alphabet I registered it.&lt;/p&gt;
&lt;h2&gt;The fun part&lt;/h2&gt;
&lt;p&gt;It took about 3h to get everything back up. Since it was a new domain, and I&amp;#39;m the first owner, the DNS propagation took about ~3h. This was good for multiple reasons and here&amp;#39;s why.&lt;/p&gt;
&lt;p&gt;First off, hats off to Ghost for making it easy to change domain names. Just by replacing the domain name in the config file and restarting the service was enough.&lt;/p&gt;
&lt;p&gt;The Cloudflare setup was just a few clicks and ... done!&lt;/p&gt;
&lt;p&gt;Turning on, all the monitoring services, took a bit longer because the domain name was different and I basically had to add every check again.&lt;/p&gt;
&lt;p&gt;Setting up the mail service, since I&amp;#39;m using a third-party one, was again just a few clicks.&lt;/p&gt;
&lt;p&gt;Now that everything was back up and in working order, there was only one issue left. The SEO aspect. I wanted ... scratch that ... I had to update every public account that I owned to feature the new domain name. This meant that I spent about ~2h editing every account and modifying the website. Twitter, G+, Github and so on and so forth. Don&amp;#39;t get me wrong, I&amp;#39;m not complaining about this aspect, because it was a chance for me to get up to speed with every account that I own and has a public profile attached to it.&lt;/p&gt;
&lt;p&gt;In terms of website SEO, there was not much I had to do, just adding the necessary things to Analytics and Webmaster tools was enough.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;The question still remains, is it worth it? Does switching domains impact you as a person, as an individual that has created a brand around him / her?&lt;/p&gt;
&lt;p&gt;Initially I would say, yes, but it all depends on your case. It could mean a brand refresh from a marketing stand point but a nightmare for a technical point of view.&lt;/p&gt;
&lt;p&gt;You have to think very hard before making a decision like this and put everything into perspective from a SEO point of view and from a technical stand point. If it&amp;#39;s to difficult to change the domain name then stick with it and you should increase your visibility, but that&amp;#39;s a whole different discussion.&lt;/p&gt;
&lt;p&gt;What&amp;#39;s your opinion on the whole matter? What issues have you faced when switching domain names.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>domains</category><category>support</category><category>customers</category><category>rant</category><category>cloudflare</category><category>seo</category><category>droplet</category><category>mailgun</category><category>dns-propagation</category></item><item><title>Working remotely? How to be awesome at it!</title><link>https://stefancosma.xyz/2015/07/26/working-remotely-how-to-be-awesome-at-it</link><guid isPermaLink="true">https://stefancosma.xyz/2015/07/26/working-remotely-how-to-be-awesome-at-it</guid><description>In this article I&apos;m going to outline a few things that can help you achieve greatness when working remotely.</description><pubDate>Sun, 26 Jul 2015 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;You may find yourself at some point in your career when you&amp;#39;ll be given the opportunity to work for a company that is not based in the same city or region as you are, but instead, said company is located abroad. So, now you&amp;#39;re going to work remotely. This means, that you and your team are not going to be in the same physical office space, but each in their own personal &amp;quot;office&amp;quot;.&lt;/p&gt;
&lt;p&gt;Now we all know the benefits of working remotely and I&amp;#39;m not going to outline them in this article but instead I&amp;#39;m going to list a few things that can help you achieve greatness when working remotely.&lt;/p&gt;
&lt;p&gt;Whether you&amp;#39;re working from home or from a co-working space there are a few things that you can do, to make the whole experience more pleasant and to make sure that you and your team are as productive as possible.&lt;/p&gt;
&lt;h3&gt;Timezones&lt;/h3&gt;
&lt;p&gt;Make sure you know all the timezones, in which every teammate is working from. Using apps like &lt;a href=&quot;http://time.is/&quot;&gt;time.is&lt;/a&gt; you make sure that you won&amp;#39;t ping your colleagues while they&amp;#39;re having their &lt;strong&gt;sleepy time&lt;/strong&gt;. Of course this doesn&amp;#39;t apply if there is an absolute emergency, like failed deploys or huge merge conflicts, that require the assistance of a colleague that is in a different timezone.&lt;/p&gt;
&lt;h3&gt;Schedule&lt;/h3&gt;
&lt;p&gt;Since we&amp;#39;re on the topic of time, you might as well make sure to keep a very transparent schedule. If your colleagues know your daily working schedule, then you won&amp;#39;t have any problems. This is really easy to achieve, just set up a public Google calendar with your team and you&amp;#39;re good to go. If you keep a very tight and neat schedule then things won&amp;#39;t go all haywire, in case of an unforeseen emergency.&lt;/p&gt;
&lt;p&gt;While on the same topic, it&amp;#39;s worth mentioning that you should differentiate your work schedule from your non-working schedule.&lt;/p&gt;
&lt;p&gt;When you&amp;#39;re not working, make sure to go outside, experience the world. That will get your creative juices flowing. Weather you&amp;#39;re having an intensive creative job or not, going outside will reset your mind and you&amp;#39;ll be more productive when returning to work.&lt;/p&gt;
&lt;p&gt;Never force yourself to work late hours and always make sure you get enough sleep. As I already mentioned above, you should have a clear schedule that outlines your working hours and your non-working hours. This, of course, only applies if there is no immediate emergency, that requires your attention.&lt;/p&gt;
&lt;p&gt;There are a lot of studies out there that explain the benefits of sleep. Of course we don&amp;#39;t know the exact reason why we need sleep, but you should be aware of your circadian rhythm and have a clear idea about your sleep pattern. I won&amp;#39;t go into details about this, but I recommend a very &lt;a href=&quot;http://www.highexistence.com/alternate-sleep-cycles/&quot;&gt;interesting article&lt;/a&gt; on the whole matter.&lt;/p&gt;
&lt;h3&gt;Office&lt;/h3&gt;
&lt;p&gt;It doesn&amp;#39;t matter if you&amp;#39;re working from home or from a co-working space, however it is important to have a proper working space. Now, there are a lot of choices out there to choose from. Here are some of them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A standard desk and ergonomic chair. I, for one, prefer &lt;a href=&quot;http://www.ikea.com/us/en/catalog/products/00103102/#/90289172&quot;&gt;this chair&lt;/a&gt;, from Ikea, and any table that has enough leg room.&lt;/li&gt;
&lt;li&gt;A standing desk. This can be any normal desk, where you can place something to keep your computer on a rise and you just ditch the chair.&lt;/li&gt;
&lt;li&gt;A combination between a standard desk / chair combo and a standing desk. To be more specific, I&amp;#39;m talking about &lt;a href=&quot;https://www.kickstarter.com/projects/1370698497/a-gravity-the-modern-workstation&quot;&gt;this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.amazon.com/TrekDesk-Treadmill-Desks-TD-01-Desk/dp/B002IYRBI0&quot;&gt;A treadmill desk?&lt;/a&gt; Well, you need to get your daily exercise, right? You do. And what better way to achieve this, then running and working at the same time. Personally I don&amp;#39;t recommend this one, because your brain won&amp;#39;t be able to focus on that many things, while working, and you&amp;#39;ll tend to lose focus fast.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Another important thing to remember when working long hours at a desk is to always stay hydrated. Some recommend that you should drink a certain amount of liquids, in any given working day. Personally I believe that you should drink as much as your body asks for. And when it comes to drinking containers I absolutely love &lt;a href=&quot;http://www.kleankanteen.com/&quot;&gt;this canteen&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Staying connected&lt;/h3&gt;
&lt;p&gt;We were bound to reach this subject at some point. Now I&amp;#39;m sure everyone has their preferred social networks to stay connected with friends and family, but how does one stay connected with their co-workers?&lt;/p&gt;
&lt;p&gt;There are a lot of good apps out there, that offer a lot of features for staying connected with your team. The most popular are Slack and Hipchat. But one has a slight advantage over the other as outlined in this Medium &lt;a href=&quot;https://medium.com/@awilkinson/slack-s-2-8-billion-dollar-secret-sauce-5c5ec7117908&quot;&gt;article&lt;/a&gt;, that I recommend you read.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s always good to have a team meeting with your team on a weekly basis. That way you can verbally outline your current tasks and what you&amp;#39;re planning on working on. Having short 1 hour sessions with the entire team will give you a clear idea about the things that are getting done. You can use apps like &lt;a href=&quot;http://zoom.us&quot;&gt;Zoom&lt;/a&gt; or &lt;a href=&quot;https://www.uberconference.com&quot;&gt;UberConferance&lt;/a&gt; to host team meetings.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t recommend using Skype or Google Hangouts for team meetings because the quality for those is very poor, when it comes to video / audio and the drop-off rate is very high (at least from what I experienced).&lt;/p&gt;
&lt;p&gt;Another important aspect when working remotely is to have a access to a good bug / task tracker app. Now, I know each company has it&amp;#39;s own system of doing things. Whether you&amp;#39;re using an internal build app or something public, that anyone can use, it&amp;#39;s important to keep it up to date with tasks and bugs. Make sure your team knows what you&amp;#39;re working on and also you&amp;#39;ll need an easy way to report bugs and discuss upon them.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have any favorites, but I can recommend a few good apps, that I&amp;#39;ve crossed paths with. You could try &lt;a href=&quot;https://asana.com&quot;&gt;Asana&lt;/a&gt;, &lt;a href=&quot;http://www.pivotaltracker.com&quot;&gt;Pivotal Tracker&lt;/a&gt;, &lt;a href=&quot;https://trello.com&quot;&gt;Trello&lt;/a&gt;, &lt;a href=&quot;https://www.atlassian.com/software/jira&quot;&gt;Jira&lt;/a&gt; and let&amp;#39;s not forget &lt;a href=&quot;https://www.mantisbt.org&quot;&gt;Mantis&lt;/a&gt;. All of these are multipurpose, so you can use them for either tracking bugs or tracking tasks.&lt;/p&gt;
&lt;h3&gt;Recommendations&lt;/h3&gt;
&lt;p&gt;Before I wrap this up, I have a few extra recommendations.&lt;/p&gt;
&lt;p&gt;Make sure that at some point, while working for the company you&amp;#39;re working remotely for, you arrange a meet-up with your team face to face or IRL. There&amp;#39;s nothing like meeting people in person. Sure, you see them via video but it&amp;#39;s something different when you actually meet a person. You observe their body language and thus you&amp;#39;ll be able to understand them better, when working on something.&lt;/p&gt;
&lt;p&gt;And last but not least, try to use social media to stay connected. you&amp;#39;ll find that socialising with your team outside the work realm is going to be beneficial for your work relationship.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;In order to be awesome at working remotely, you need to make sure that you have a well established schedule and you&amp;#39;re office space is properly organised. I&amp;#39;m not saying you should follow my recommendations, it&amp;#39;s your life, you can what ever you want, these are just things I came across while working remotely, that worked for me.&lt;/p&gt;
&lt;p&gt;As an added bonus I highly recommend &lt;a href=&quot;http://www.lifehack.org/articles/work/9-reasons-why-remote-working-awesome-and-how-make-the-most.html&quot;&gt;this article&lt;/a&gt;, on Lifehack, about making the most of working remotely.&lt;/p&gt;
&lt;p&gt;What other things did I miss? Let me know in the comments bellow.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>useful</category><category>awesome</category><category>tools</category><category>apps-tag</category><category>remote</category><category>work</category><category>schedule</category><enclosure url="https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/3BmLS45.png" length="0" type="image/png"/></item><item><title>Gedit on steroids!</title><link>https://stefancosma.xyz/2015/07/17/gedit-on-steroids</link><guid isPermaLink="true">https://stefancosma.xyz/2015/07/17/gedit-on-steroids</guid><description>Gedit - Your simple text editor just transformed itself into a full fledged IDE.</description><pubDate>Fri, 17 Jul 2015 00:00:00 GMT</pubDate><content:encoded>&lt;h3&gt;Programming ...&lt;/h3&gt;
&lt;p&gt;For me it started out as a passion, when I wasn&amp;#39;t even in highschool. I used to doodle small animations, in ASCII, for the Windows command line. Notepad was the tool I used to achieve this. Why? Because that&amp;#39;s the first thing I encountered on my fresh install of Windows 95.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Notepad&lt;/strong&gt; was my first ever real &amp;quot;code editor&amp;quot;. Don&amp;#39;t get me wrong, I&amp;#39;ve used it to edit text files and any other type of files that are supported but I mainly liked using it as a code editor.&lt;/p&gt;
&lt;p&gt;Now, along the years I have come across a lot of code editors, some good and some not so good. But sometimes you encounter one that amazes you through it&amp;#39;s simplicity and usefulness.&lt;/p&gt;
&lt;p&gt;Imagine you have a stick. Now, you can tie a sharp pointy rock to that stick and use it as a spear or tie a string to it and use it as a bow, but in the end it&amp;#39;s just a stick.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if you understood my analogy but what I&amp;#39;m trying to say is, the more simpler the base is, the more extensible it becomes.&lt;/p&gt;
&lt;h3&gt;Along comes Gedit&lt;/h3&gt;
&lt;p&gt;For those of you who aren&amp;#39;t familiar with &lt;strong&gt;Gedit&lt;/strong&gt;, this is the Wiki description:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;gedit (/ˈdʒɛdɪt/ or /ˈɡɛdɪt/) is the default text editor of the GNOME desktop environment and part of the GNOME Core Applications. Designed as a general purpose text editor, gedit emphasizes simplicity and ease of use. It includes tools for editing source code and structured text such as markup languages.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Basically Gedit comes by default on some Linux based systems. We could say that it&amp;#39;s the Notepad of Linux based systems, though this may be a bit far fetched.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m saying it&amp;#39;s a bit far fetched because your can do whole range of great stuff with Gedit that with Notepad you just can&amp;#39;t.&lt;/p&gt;
&lt;p&gt;It all stars with a simple Terminal command.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get install gedit-plugins
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once you&amp;#39;ve installed those plugins, a whole world opens up. Your &amp;quot;stick&amp;quot; suddently has the ability to morph into anything.&lt;/p&gt;
&lt;p&gt;For example, you now have access, based on the plugins plackage you just installed, to a whole range of tools. Tools like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bracket completion&lt;/li&gt;
&lt;li&gt;Code comment&lt;/li&gt;
&lt;li&gt;Color picker&lt;/li&gt;
&lt;li&gt;Embeddded Terminal. By far my favorite one.&lt;/li&gt;
&lt;li&gt;Modelines - Emacs, Vim-style modelines&lt;/li&gt;
&lt;li&gt;Multi edit. Another very usefull one.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;and a whole lot more.&lt;/p&gt;
&lt;p&gt;Basically your simple text editor just transformed itself into a full fledged IDE. Of course it doesn&amp;#39;t have all the capabilities of Sublime or Atom but for a beginner this is perfectly fine.&lt;/p&gt;
&lt;p&gt;Did I mention it&amp;#39;s blazing fast. In comparison to Sublime or Atom, Gedit load instantly almost anything.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;In the end it doesn&amp;#39;t really matter what you end up using, as long as it gets the job done. I&amp;#39;m not saying we should all ditch our current workflow and switch to Gedit, I am just trying to point out the fact that some simple tools can be transformed into great things, that can be useful and practical.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>thoughts</category><category>tools</category><category>highlight</category><category>ide</category><category>improvements</category><category>gedit</category></item><item><title>How To: Auto increment a custom post type title</title><link>https://stefancosma.xyz/2015/02/28/how-to-auto-increment-custom-post-type-title</link><guid isPermaLink="true">https://stefancosma.xyz/2015/02/28/how-to-auto-increment-custom-post-type-title</guid><description>This short snippet of code will help when you&apos;re trying to auto-increment the custom post type title because the user is not allowed to edit the title.</description><pubDate>Sat, 28 Feb 2015 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;You&amp;#39;re working on a new project with WordPress. You enjoy yourself. You&amp;#39;re confident in your abilities but then all of a sudden you realize you need a bunch of custom post types and the user is not allowed to edit the title to one of them but you need to find a way to auto-increment the title because that was a client request.&lt;/p&gt;
&lt;p&gt;So, you pull up the functions file, scratch your head and copy / paste the bellow snippet and hope for the best.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Use a filter to make the change
add_filter( &amp;#39;wp_insert_post_data&amp;#39; , &amp;#39;modify_post_title&amp;#39; , &amp;#39;99&amp;#39;, 2 );
function modify_post_title( $data , $postarr ) {

	// Check for the custom post type and it&amp;#39;s status
	// We only need to modify it when it&amp;#39;s going to be published
	$posts_status = [&amp;#39;publish&amp;#39;, &amp;#39;future&amp;#39;, &amp;#39;pending&amp;#39;, &amp;#39;private&amp;#39;, &amp;#39;trash&amp;#39;];
    if( $data[&amp;#39;post_type&amp;#39;] == &amp;#39;penguins&amp;#39; &amp;amp;&amp;amp; !in_array($data[&amp;#39;post_status&amp;#39;], $posts_status)) {

    	// Count the number of posts to check if the current post is the first one
    	$count_posts = wp_count_posts(&amp;#39;penguins&amp;#39;);
		$published_posts = $count_posts-&amp;gt;publish;

		// Check if it&amp;#39;s the first one
		if ($published_posts == 0) {

			// Save the title and the slug
			$data[&amp;#39;post_title&amp;#39;] = date(&amp;#39;Y-m&amp;#39;) . &amp;#39;-1&amp;#39;;
			$data[&amp;#39;post_name&amp;#39;] = sanitize_title($data[&amp;#39;post_title&amp;#39;]);

		} else {

			// Get the most recent post
			$args = array(
			    &amp;#39;numberposts&amp;#39; =&amp;gt; 1,
			    &amp;#39;orderby&amp;#39; =&amp;gt; &amp;#39;post_date&amp;#39;,
			    &amp;#39;order&amp;#39; =&amp;gt; &amp;#39;DESC&amp;#39;,
			    &amp;#39;post_type&amp;#39; =&amp;gt; &amp;#39;penguins&amp;#39;,
			    &amp;#39;post_status&amp;#39; =&amp;gt; &amp;#39;publish&amp;#39;
			);
	        $last_post = wp_get_recent_posts($args);
	        // Get the title
	        $last_post_title = $last_post[&amp;#39;0&amp;#39;][&amp;#39;post_title&amp;#39;];
	        // Get the title and get the number from it.
	        // We increment from that number
	        $number = explode(&amp;#39;-&amp;#39;, $last_post_title);
	        $number = intval($number[2]) + 1;

	        // Save the title and the slug
	        $data[&amp;#39;post_title&amp;#39;] = date(&amp;#39;Y-m&amp;#39;) . &amp;#39;-&amp;#39; . $number;
	        $data[&amp;#39;post_name&amp;#39;] = sanitize_title($data[&amp;#39;post_title&amp;#39;]);

		}        
    }
    return $data;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But what does this code do? Let us begin from the top, shall we?&lt;/p&gt;
&lt;p&gt;We start from the premise that the user is not allowed to edit the custom post type title entitled &lt;em&gt;penguins&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;To be able to identify the post we&amp;#39;ll need to add a title manually, after the post is published. We can do that using the, very useful, filter &lt;code&gt;wp_insert_post_data&lt;/code&gt;. This will enable us to grab the data that is send to the database and alter it.&lt;/p&gt;
&lt;p&gt;After we grab the post data we need to check the state that the post is in. Because we don&amp;#39;t want to modify the title if the state is altered in any way. We just create a simple array of all the post statuses and check the current post status with that array. We also want to make sure we&amp;#39;re modifying the correct post type, so we check for that as well.&lt;/p&gt;
&lt;p&gt;If the test passed then we need to count the number of posts and see if the current one is the first one for this custom post type. We do this using the &lt;code&gt;wp_count_posts&lt;/code&gt; function and then grabbing only the published ones.&lt;/p&gt;
&lt;p&gt;If there are no published posts then we save the &lt;code&gt;post_title&lt;/code&gt; with the current date (Y-m) and the number 1.&lt;/p&gt;
&lt;p&gt;Now this next step is where the magic happens. If we do have posts then we need to get the most recent one using the &lt;code&gt;wp_get_recent_posts&lt;/code&gt; functions. After that, we get the title for that post and since the title is partitioned using the &lt;code&gt;-&lt;/code&gt; character (you can use any character you want) we just need to &lt;code&gt;explode&lt;/code&gt; it (the title that is) and increment the number it results to form the new title and save that as the new post title. We also apply the same thing to the post slug, represented here by &lt;code&gt;post_name&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Return.&lt;/p&gt;
&lt;p&gt;And that folks is how you auto increment a custom post type title, until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>wordpress</category><category>tutorials</category><category>custom-post-type</category><category>how-to</category><category>short</category></item><item><title>Koding everything ... in the cloud!</title><link>https://stefancosma.xyz/2014/10/11/koding-new-release</link><guid isPermaLink="true">https://stefancosma.xyz/2014/10/11/koding-new-release</guid><description>You thought I made a typo didn&apos;t you? No, I did not make a typo, I am actually talking about Koding [https://koding.com].  But why am I talking about Koding?  F</description><pubDate>Sat, 11 Oct 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;You thought I made a typo didn&amp;#39;t you? No, I did not make a typo, I am actually talking about &lt;a href=&quot;https://koding.com&quot;&gt;Koding&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But why am I talking about Koding?&lt;/p&gt;
&lt;p&gt;For starters this article was in my writing queue for some time and also because I am one of the two &lt;strong&gt;community managers&lt;/strong&gt; that handle the Koding community. By community manager I mean, I handle the support channel, engage with people to make the environment more pleasing for everyone and I help build everything that doesn&amp;#39;t involve the Koding core, for example stuff like the &lt;a href=&quot;http://learn.koding.com&quot;&gt;Koding University&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So what is Koding? Well let me shed some light onto that.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Koding is a developer community and cloud development environment where developers come together and code in the browser – with a real development server to run their code. Developers can work, collaborate, write and run apps without jumping through hoops and spending unnecessary money.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ok now that you&amp;#39;re up to speed with everything we can cut to the chase.&lt;/p&gt;
&lt;h2&gt;Introducing the all new Koding. The best one yet!&lt;/h2&gt;
&lt;p&gt;We wanted to improve stability for our users because we had a lot of issues in the past with downtime and such. But we couldn&amp;#39;t just improve the back-end and leave the front behind so we overhauled everything and made it more user friendly.&lt;/p&gt;
&lt;p&gt;And that&amp;#39;s why the whole team got together and rewrote Koding from the ground up.&lt;/p&gt;
&lt;p&gt;You may ask yourself what changes have been made besides the visual ones. Let me explain some of the new features that come with the new Koding. I promise I&amp;#39;ll be concise.&lt;/p&gt;
&lt;h3&gt;Improved Stability&lt;/h3&gt;
&lt;p&gt;We have improved stability a ton!!&lt;/p&gt;
&lt;p&gt;The major improvement here is that there are no more hyper-vised VMs. Now every VM is a real VM, and there shouldn&amp;#39;t be anything to prevent you from working on your awesome project because of VM downtime. So in other words, no more crashes.&lt;/p&gt;
&lt;p&gt;Another great feature that comes along with the non-hyper-vised VMs is the fact that every VM comes with a public IP that changes every time a VM is turned on. How awesome is that?&lt;/p&gt;
&lt;h3&gt;The all new IDE&lt;/h3&gt;
&lt;p&gt;An important part of our platform, besides the awesome ever growing community, is the IDE. The IDE is the gateway to the VMs and is the main driving force for any projects.&lt;/p&gt;
&lt;p&gt;We thought it was time for a much needed redesign overhaul and so by combining the the powers of developer fairy dust and user&amp;#39;s feedback we managed to put something awesome together, that we are very very proud of.&lt;/p&gt;
&lt;p&gt;Some of the features that come with the new IDE include:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/CUpEbpR.png&quot; alt=&quot;Koding IDE&quot;&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Split panes.&lt;/strong&gt; This has been a much requested feature. Best of all you can split into how many panes you want, you are only restricted by the readability of each pane and your screen size. And because we know how important the Terminal is for a developer we made sure that by default the IDE is split into two: the editor and the Terminal.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Drawingboard.&lt;/strong&gt; This feature has been implemented in the new IDE because we knew how important it is when you want to make a quick mind map of what&amp;#39;s going on in your head or you want to quickly sketch a feature for your awesome app.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;New keyboards shortcuts.&lt;/strong&gt; If you&amp;#39;re one of those developers that uses only a keyboard like in the early days prior to the invention of the mouse then we made sure you can work your way around the Koding IDE using only keyboard shortcuts. Cool, right?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Awesome new search.&lt;/strong&gt; What happens when you need some feature from a different project, do you start opening every file you can get your hands on until you find it? No. You search that entire project because you now have the ability to search in files and and replace anything if needs be.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Workspaces.&lt;/strong&gt; If you&amp;#39;re working on an important project and you set up the IDE the way you liked it, you can now define a workspace. If each project requires a custom setup then worry not because you define how many workspace you want that best suits every project that you’re working on.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Other visual improvements.&lt;/strong&gt; We also made a lot of usability improvements to the IDE and Koding as well. You can customize Koding how it suits your best. You can collapse all sidebars, there is an all new setting sidebar integrated in the IDE and let&amp;#39;s not forget about the file tree that can now be collapsed to save you precious screen space.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There are some of the features that come with the new IDE. If you want more in depth stuff, open up the new Koding and give the new IDE a spin or head over to the Github project page &lt;a href=&quot;https://github.com/koding/ide&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Socializing&lt;/h3&gt;
&lt;p&gt;What&amp;#39;s better than a free VM with root access? A large community of developers that will help you implement awesome projects. Because Koding&amp;#39;s users are our number one priority we implemented some awesome features that have been requested for a very long time.&lt;/p&gt;
&lt;p&gt;By popular demand we implemented chat. You can now chat with your friends or teammates via the new chat feature and will. Whether you&amp;#39;re sharing ideas with just a friend or a whole team, the new chat works with everything you throw at it.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/3MndPH3.png&quot; alt=&quot;Koding Activity&quot;&gt;&lt;/p&gt;
&lt;p&gt;We also gave the activity feed some love. The markdown capabilities have been improved on the feed and among the various other things you can do with markdown in a post you can now comment in markdown, because who doesn&amp;#39;t love to reply with a quick code snippet to a hard development problem. Btw, this has been one of our most requested features, you can now comment on any post on the feed using markdown. so it was bound to happen at some point.&lt;/p&gt;
&lt;p&gt;Channels, channels everywhere! The new channels feature will help you manage what interests you the most. Whether you&amp;#39;re interested in basic HTML, CSS or advanced programming, you can follow only the stuff that are important to you.&lt;/p&gt;
&lt;h3&gt;En fin!&lt;/h3&gt;
&lt;p&gt;Some people may ask why the change, well we knew things weren&amp;#39;t going in the direction we wanted them to go so we gathered the whole team and started brainstorming ideas on how to improve Koding. We made a plan and we stuck to it until the very end. This meant that every new feature that we wanted to implement in the new Koding would have to go through a thorough testing process.&lt;/p&gt;
&lt;p&gt;What should you expect as a user from the new improved Koding? Stability, performance and a more awesome community of developers.&lt;/p&gt;
&lt;p&gt;With this new change we&amp;#39;re expecting the community to grow and also because we now don&amp;#39;t have to worry about stability, on our systems, we can now shift our focus on implementing more cool awesome features for our users.&lt;/p&gt;
&lt;p&gt;That is all for now, until next time, code long and prosper and see you on Koding!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>koding</category><category>cloud-computing</category><category>ide</category><category>new-release</category></item><item><title>An open letter to WordPress devs about standardization</title><link>https://stefancosma.xyz/2014/09/16/open-letter-wordpress-standardization</link><guid isPermaLink="true">https://stefancosma.xyz/2014/09/16/open-letter-wordpress-standardization</guid><description>Dear WordPress dev community and Automattic, I&apos;ve been working with WordPress for the past 5+ years. In this time frame I have worked with a lot of stuff, from</description><pubDate>Tue, 16 Sep 2014 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Dear WordPress dev community and Automattic,&lt;/h2&gt;
&lt;p&gt;I&amp;#39;ve been working with WordPress for the past 5+ years. In this time frame I have worked with a lot of stuff, from free crappy open source themes to high-end premium ones. I&amp;#39;ve built plugins, themes, you name it. In all my years as a developer, that uses WordPress as his main work platform, I&amp;#39;ve tried to standardize my workflow and the stuff that I use when I&amp;#39;m developing new things.&lt;/p&gt;
&lt;p&gt;All this time, I came across some stuff that in my opinion should have a standard. These things obstruct the way a developer interacts with certain aspects of a theme and / or plugin from a development perspective.&lt;/p&gt;
&lt;p&gt;For starters, I believe that every developer, that wants to build a theme and / or a plugin, needs to follow some strict guidelines or standards that should be either imposed by the community or by Automattic.&lt;/p&gt;
&lt;h2&gt;Standards&lt;/h2&gt;
&lt;p&gt;When I say guidelines I&amp;#39;m not referring to the ones &lt;a href=&quot;http://make.wordpress.org/core/handbook/coding-standards/&quot;&gt;here&lt;/a&gt;, these are guidelines on how to write and structure code.&lt;/p&gt;
&lt;p&gt;I am referring to standards on how a theme is structured. For example, I am working with a theme that doesn&amp;#39;t belong to me, code wise, and I want to be able to export the options of that theme for either backup purposes or to use them with a different installation of that theme. Now, the problem arises, not every theme offers this ability. This is because there is no specific standard set for this and developers are either to busy to add this features or don&amp;#39;t know how to do it. This should be a must with every theme.&lt;/p&gt;
&lt;p&gt;I know it&amp;#39;s hard to set a standard like this and I agree it&amp;#39;s bit far-fetched but maybe we can work something out. For example, the community (myself included) could establish an initiative that builds a theme options framework, that is the starting point for every theme developer. This should include the most basic things, like for example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Export / import theme options,&lt;/li&gt;
&lt;li&gt;Naming conventions. Sections in the theme options should have the same name across all themes.&lt;/li&gt;
&lt;li&gt;Same options names in the database.&lt;/li&gt;
&lt;li&gt;etc...*&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;*I&amp;#39;ll add more to the list in the future&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The second to last point, from the above list, is another thing that should be considered as an important standard.&lt;/p&gt;
&lt;p&gt;The theme option name set in the database is different for every single theme. It&amp;#39;s very confusing when you&amp;#39;re working with different themes all the time. This should be a global thing set by WordPress itself. Something like &amp;quot;Hey, if you want to save your theme options, use this option name instead of your own naming conventions!&amp;quot;.&lt;br&gt;Why should this be a standard? Because when working with multiple themes and child themes you need to have a clear view of what&amp;#39;s saved in the database and the best way to this is by having the same name or prefix used for all themes.&lt;/p&gt;
&lt;p&gt;I propose something along these lines:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;theme_options_[Theme name]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now this option name is clear and you know what to look for in the database when searching for theme options.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In the end, I&amp;#39;ll just say this, yes I am aware WordPress is an open source project and not everyone can conform to the same things because every developer has his / hers way of doing stuff, but keep in mind that standards are important. Standards are what got us here in the first place.&lt;/p&gt;
&lt;p&gt;Theme developers, I&amp;#39;ll only say this, have other developers in mind when building something, not just the end user, because other developers are first and foremost users and if they can&amp;#39;t use your product properly then what&amp;#39;s the point of all this?!&lt;/p&gt;
&lt;h2&gt;Bonus&lt;/h2&gt;
&lt;p&gt;There are also some other things that need to be standardized in WordPress and apparently the community is already working on a initiative. Custom post types and taxonomies are also something that needs a standard, but I won&amp;#39;t talk more here, maybe in another article. In the meantime go ahead and checkout &lt;a href=&quot;http://wptavern.com/wordpress-developers-organize-community-initiative-to-standardize-custom-post-types-taxonomies-and-metadata&quot;&gt;this article&lt;/a&gt; and &lt;a href=&quot;http://www.poststat.us/wordpress-com-jetpack-lead-way-toward-standardizing-custom-post-types/&quot;&gt;this one&lt;/a&gt; for more info on the matter.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Another WordPress developer&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>open-letter</category><category>open-source</category><category>rant</category><category>wordpress</category><category>standards</category><category>developers</category><category>development</category></item><item><title>WordCamp Romania 2014 | Conference Adventures – Episode 3</title><link>https://stefancosma.xyz/2014/09/10/wordcamp-romania-2014-conference-adventures-episode-3</link><guid isPermaLink="true">https://stefancosma.xyz/2014/09/10/wordcamp-romania-2014-conference-adventures-episode-3</guid><description>It was bound to happen at some point in time. It was on my wish-list ever since I heard that the WordPress community is organizing events that gather the most t</description><pubDate>Wed, 10 Sep 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;It was bound to happen at some point in time. It was on my wish-list ever since I heard that the WordPress community is organizing events that gather the most talented and most inspiring people, people that work with WordPress.&lt;/p&gt;
&lt;p&gt;After I attended last years WordCamp in Cluj, RO (which was my first WordCamp ever) I knew that someday I&amp;#39;ll be on that stage speaking about one of the things I know best, WordPress.&lt;/p&gt;
&lt;h2&gt;Planning&lt;/h2&gt;
&lt;p&gt;When I saw the call for speakers, within 10 minutes I submitted a talk proposal and surely my talk was accepted, within a week or so. Of course I was super excited about the news and I stared planning the talk and also the whole trip.&lt;/p&gt;
&lt;p&gt;This time around the WordCamp Romania edition was held in Timisoara. A beautiful city in it&amp;#39;s own way, to bad the historical part of the city was under construction when I was there. I wish I could have seen the real beauty behind all that rubble.&lt;/p&gt;
&lt;p&gt;The date was set, on the 28 June I was to speak on a stage before 100+ people about WordPress development anywhere. In case you missed the page on the left where I talk about me speaking at conferences and share the slides to each of my talks you can find the slides to this talk, &lt;a href=&quot;https://speakerdeck.com/stefanbc/wordpress-development-anywhere-wordcamp-2014-romania&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In short I talk about how developers can start a WordPress instance in just seconds with &lt;a href=&quot;https://koding.com&quot;&gt;Koding&lt;/a&gt; and how they can collaborate, in real time, to get the best results.&lt;/p&gt;
&lt;h2&gt;The talk&lt;/h2&gt;
&lt;p&gt;I won&amp;#39;t get into any trip details, because this time around everything worked as expected and I got there in one piece.&lt;/p&gt;
&lt;p&gt;The day of the talk came around and I was the first of the speakers to arrive. I should mention I arrived a day early to do a bit of sight seeing and to find out where exactly I was going to speak.&lt;/p&gt;
&lt;p&gt;After some breakfast and some awesome swag from the swag table I started mentally preparing while listening to the people that had talks before mine. Everyone was awesome and it was an absolute pleasure to talk on the same stage with people the are much wiser then me and that have worked with WordPress for a very long time. A big shout-out to &lt;a href=&quot;https://twitter.com/danstefancu&quot;&gt;@danstefancu&lt;/a&gt; for the encouragement and support before and after the talk.&lt;/p&gt;
&lt;p&gt;The actual talk went great, the Q&amp;amp;A session was impressive, and as always the demo was rubbish, but it doesn&amp;#39;t matter because I already made my point. I got a lot of pertinent questions and I hope I answered all of them. If I didn&amp;#39;t I apologize.&lt;/p&gt;
&lt;h2&gt;En fin&lt;/h2&gt;
&lt;p&gt;So as to wrap this up, I had an amazing time at this years WordCamp Romania. The organizers did an amazing job with the event. The food was out of this world, the people were really kind, welcoming and supportive. I can say that it was by far the best conference experience I ever had.&lt;/p&gt;
&lt;p&gt;Needles to say, now I&amp;#39;m planning on doing a WordCamp closer to home, it probably won&amp;#39;t be as awesome as the one I just attended but who knows.&lt;/p&gt;
&lt;p&gt;What experience have you had with WordCamp so far? Have you participated at any, as a speaker or attendee? Let me know in the comments bellow.&lt;/p&gt;
&lt;p&gt;And before I forget, in a future article I&amp;#39;ll post some of my tips on how to have an awesome talk, so stick around if you want to find out more.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>wordcamp</category><category>speaking</category><category>wordpress</category><category>conference</category><category>adventures</category><category>episodes</category></item><item><title>What&apos;s my uptime?</title><link>https://stefancosma.xyz/2014/09/10/whats-my-uptime</link><guid isPermaLink="true">https://stefancosma.xyz/2014/09/10/whats-my-uptime</guid><description>So I wrote a small project over the course of a few days.  What started out as a small internal thing has turned out to be something more complex but in the end</description><pubDate>Wed, 10 Sep 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;So I wrote a small project over the course of a few days.&lt;/p&gt;
&lt;p&gt;What started out as a small internal thing has turned out to be something more complex but in the end very satisfying.&lt;/p&gt;
&lt;p&gt;Initially it started as something simple that I used on daily basis at work. I wanted a way to monitor the local server that I have just 6 feet away from me. It&amp;#39;s a crappy old machine that doesn&amp;#39;t do much, other then store some files.&lt;/p&gt;
&lt;p&gt;Because I have the luxury of having an external monitor attached to my laptop, I could just glance over the it and see if everything is working properly. The idea behind it came after I saw that popular &lt;a href=&quot;https://github.com/afaqurk/linux-dash&quot;&gt;Linux Dash&lt;/a&gt; project on Github.&lt;/p&gt;
&lt;p&gt;Enter &lt;a href=&quot;https://github.com/stefanbc/uptimey&quot;&gt;uptimey&lt;/a&gt;, a beautiful server monitor!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gbxpmskokamsentnpbfo.supabase.co/storage/v1/object/public/post-images/isg9t8n.png&quot; alt=&quot;Screenshot&quot;&gt;&lt;/p&gt;
&lt;p&gt;I wanted something that looks good (the ones that I found didn&amp;#39;t impress me at all), is fast and updates automatically without having to hit a button or anything else.&lt;/p&gt;
&lt;p&gt;Now let me tell you a little about the features that &lt;strong&gt;uptimey&lt;/strong&gt; has:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Easy install.&lt;/strong&gt; Just clone the repo and your done. Works out of the box.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Updates automatically.&lt;/strong&gt; It auto-refreshes the values each 60 secs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It&amp;#39;s beautifully designed.&lt;/strong&gt; It grabs the Bing image of the day automatically and uses a clean readable font with a simple UI wrapped around it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Works everywhere.&lt;/strong&gt; Or at least is should (if you find a place where it doesn&amp;#39;t work, please by all means open up an issue on Github).It has been tested on Linux, Windows and Mac servers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Share it everywhere.&lt;/strong&gt; If you&amp;#39;re proud of your uptime you can share it o Twitter.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bonus feature.&lt;/strong&gt; If it just hangs you can hard refresh using the provided button.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I should mention that for this to work you need some stuff on your server:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;An internet connection.&lt;/li&gt;
&lt;li&gt;PHP installed.&lt;/li&gt;
&lt;li&gt;Some type of server, like Apache or nginx installed.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;For developers&lt;/h2&gt;
&lt;p&gt;For starters it&amp;#39;s open source. You can find it on Github and contribute to it.&lt;br&gt;In the repo you&amp;#39;ll find some stuff to help you develop it, like a Vagrant file and gruntjs file. If you don&amp;#39;t know what Vagrant or Grunt are, google them.&lt;/p&gt;
&lt;h2&gt;The Future&lt;/h2&gt;
&lt;p&gt;I have some upcoming features that I want to implement as soon as possible. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Showing the server load.&lt;/li&gt;
&lt;li&gt;Make it responsive.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you feel like contributing, please by all means &lt;a href=&quot;https://github.com/stefanbc/uptimey&quot;&gt;fork it&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I hope you enjoyed this brief presentation of a small project that I built. If you have any feedback or issues / questions please leave them in the comments bellow or drop a note &lt;a href=&quot;mailto:hello@stefancosma.eu&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>open-source</category><category>tools</category><category>server</category><category>uptimey</category><category>projects</category></item><item><title>Meeting the locals!?</title><link>https://stefancosma.xyz/2014/09/08/meeting-the-locals</link><guid isPermaLink="true">https://stefancosma.xyz/2014/09/08/meeting-the-locals</guid><description>A more appropriate title would be: should I meet the locals or do I have any locals that I should meet and when I say locals I&apos;m referring to local developers /</description><pubDate>Mon, 08 Sep 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A more appropriate title would be: should I meet the locals or do I have any locals that I should meet and when I say locals I&amp;#39;m referring to local developers / web designers around my area or even around the country.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I have a big issue with this topic.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;How so, you may ask?&lt;/p&gt;
&lt;p&gt;Well for starters, around my city there is a lack of social gatherings and a shortage of developer communities. Either there are some that are so underground that not even the NSA knows about or they simply don&amp;#39;t exist. I prefer the latter.&lt;/p&gt;
&lt;p&gt;Not having these type of communities means that I can&amp;#39;t share my knowledge or learn from others that work in the same field as me and share the same mother tongue. This is a major issue for me because by nature I&amp;#39;m a social person and I love pushing myself to newer hights with the help of the stuff I learn from others.&lt;/p&gt;
&lt;p&gt;Sure I have Twitter, Github, G+ etc but that&amp;#39;s on the interwebs. I&amp;#39;m old school, I like face to face interaction.&lt;/p&gt;
&lt;p&gt;But there is a silver lining to all this, I found one such place where I can share the stuff I find interesting, the stuff I know about and where I can learn stuff from others. This place is a digital one in the form of &lt;a href=&quot;http://devforum.ro&quot;&gt;devforum.ro&lt;/a&gt;. Devforum.ro has finally fulfilled my desire of having a place where I can talk to people that appreciate what I do and where I can learn new amazing things, that&amp;#39;s not Twitter or any other social medium.&lt;/p&gt;
&lt;p&gt;Above all this, I should mention that thank the web gods for all the amazing conferences that I attend. Thank the web gods for those! If it weren&amp;#39;t for those, probably I would have gone mad and locked myself in the highest room of the tallest tower.&lt;/p&gt;
&lt;p&gt;Still there is an issue. How can one engage with local people that have the same interests as you? I have searched the web relentlessly for events, meetups, social gatherings around my area that I can take part of. And still nothing! Why is there such a lack of socialness in small towns / areas? Are the developers scared of something? I know there are developers around the city (I attened university with 30+ of them).&lt;/p&gt;
&lt;p&gt;Got any ideas on how to fix this? What do you do in your area? Do you organize meetups yourself? Let me know in the comments bellow.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>questions</category><category>rant</category><category>developers</category><category>community</category></item><item><title>Docked or undocked? That is the question.</title><link>https://stefancosma.xyz/2014/09/07/docked-or-undocked-that-is-the-question</link><guid isPermaLink="true">https://stefancosma.xyz/2014/09/07/docked-or-undocked-that-is-the-question</guid><description>So I ran a poll. And people answered and the results surprised me, to say the least. The question was simple. Developer Tools docked or undocked?  74% of all pe</description><pubDate>Sun, 07 Sep 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;So I ran a poll. And people answered and the results surprised me, to say the least. The question was simple. Developer Tools docked or undocked?&lt;/p&gt;
&lt;p&gt;74% of all people that answered my question said that they prefer to use the developer tools docked. I was a bit surprised because this means that either they have small screens or they don&amp;#39;t know they can undock.&lt;/p&gt;
&lt;p&gt;The other 26% said they prefer to have it undocked because they know they can have docked but choose not to.&lt;/p&gt;
&lt;p&gt;So what do these numbers actually mean? Well from what I understand and from my personal experience, it all depends on the case. If you&amp;#39;re like me and at the office you have two monitors then, yes, you can afford to undock your developer tools and on one monitor have the browser and the other one have the developer tools. But if you&amp;#39;re only using your small &lt;strong&gt;1366x768&lt;/strong&gt; laptop rez (like I do at home), then undocking the developer tools is not such a great idea.&lt;/p&gt;
&lt;p&gt;This issue is case depended, as I already said before, but that doesn&amp;#39;t mean we can&amp;#39;t talk about it further.&lt;/p&gt;
&lt;p&gt;The developer tools are there to help you and as every tool you have to use it to it&amp;#39;s full potential, thus undocking it is the best approach, in my opinion. Looking at the DOM properly and fiddling with it is as awesome as it sounds.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not saying I&amp;#39;m not using the developer tools docked but it most cases it&amp;#39;s the other way around, just because it feels more comfortable and it helps me read the code or console comfortably.&lt;/p&gt;
&lt;p&gt;This is also browser dependent. Why? Well because if you&amp;#39;re on Chrome, then my suggestion is to just try it undocked and the same goes for Firefox. On Firefox for example if you&amp;#39;re using the 3D view to visualize your page then having something docked at the bottom or on the right is not the best choice.&lt;/p&gt;
&lt;p&gt;What is your opinion on this? Let me know in the comments bellow.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Bonus: the poll is still up: &lt;a href=&quot;http://votes.io/if3d&quot;&gt;http://votes.io/if3d&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>questions</category><category>tools</category><category>developers</category><category>polls</category><category>development</category></item><item><title>Mozilla Open Source Iasi | Conference Adventures – Episode 2</title><link>https://stefancosma.xyz/2014/05/11/mozilla-open-source-iasi-conference-adventures-episode-2</link><guid isPermaLink="true">https://stefancosma.xyz/2014/05/11/mozilla-open-source-iasi-conference-adventures-episode-2</guid><description>It all started on a gloomy fall day, last year. The air was warm and I just finished writing a long(ish) email to someone who now has my utmost respect and appr</description><pubDate>Sun, 11 May 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;It all started on a gloomy fall day, last year. The air was warm and I just finished writing a long(ish) email to someone who now has my utmost respect and appreciation. In case you were wondering I’m talking about one of Mozilla’s representatives around here, &lt;a href=&quot;https://twitter.com/andreea_popescu&quot;&gt;Andreea&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Andreea is the mastermind behind one of the industries most “underground” events. I kid of course! The event I’m talking about is under the Mozilla flag and it couldn’t have been more well prepared and organized.&lt;/p&gt;
&lt;p&gt;I knew she was putting something together, this year, because, well we talked about it and she explained how this event would go. She had lists over lists of stuff that needed to be done. I had my small contribution to the overall organization of the even, of course.&lt;/p&gt;
&lt;p&gt;When she finally decided on a date and topic for the event, she asked me if I knew anyone who was willing to speak at this event. If you haven’t figured it out by now, I was also going to speak at this event. Of course, my first choice was my good friend &lt;a href=&quot;https://twitter.com/jcrsb&quot;&gt;Jakob&lt;/a&gt;, who has a long experience in speaking at events.&lt;/p&gt;
&lt;p&gt;The date was set for 15 March in the lovely city of Iasi and the topic was open source.&lt;br&gt;Reservations were made and finally the date came around.&lt;/p&gt;
&lt;p&gt;I forgot to mention, the topic of my talk was how can Koding help the Open Source community and the developer community in general.&lt;/p&gt;
&lt;p&gt;If you’ve read my previous post about my adventures at a conference you probably know that I’m not very lucky when it comes to getting to a far away place. I was set to depart on the 14th by bus. It was a long 8 hour drive. But in the end I got there in one piece.&lt;/p&gt;
&lt;p&gt;Check-in at the hotel? Check! Meet up with the rest of the speakers, including Andreea and Jakob? Check!&lt;/p&gt;
&lt;p&gt;After the pre-conference fun was over, the conference day came around. The venue for the whole event was a conference room in one of Iasi’s biggest malls. And thus the stage was set!&lt;/p&gt;
&lt;p&gt;The event started and everybody had their goodies to play with. (Thanks Mozilla and XWiki for the goodies!)&lt;/p&gt;
&lt;p&gt;The first one on the stage was Jakob. He indulged us with some funny anecdotes and explained why you should develop stuff embracing the open source concept. The audience, still fresh, was captivated by the humours talk.&lt;/p&gt;
&lt;p&gt;Up next was Andreea, that showed us ways to get involved in the Mozilla movement. The only thing I can say about the talk is that, I am now a more frequent user of Mozilla, not only because of the talk but because Chrome is stubborn and refuses to work properly.&lt;/p&gt;
&lt;p&gt;Sabin and Flavius, had some great talks about 5 star data and WoUSO (World of USO). The latter made me want to actually play the game if it were available for everyone.&lt;/p&gt;
&lt;p&gt;A short break and I had the stage. After some technical difficulties with navigation, I managed to keep the talk going. When the demo time came around, I had some more technical difficulties because of the WiFi, but the audience didn’t seem to mind it. The Q&amp;amp;A session was amazing. I had a lot of questions about Koding and the overall vibe of the audience was awesome.&lt;/p&gt;
&lt;p&gt;The rest of talks were incredibly interesting and informative with a few worthy mentions.&lt;/p&gt;
&lt;p&gt;The Mozilla reps, Alex and Ioana shared some info about the new Firefox OS (I had a chance to play with a Firefox OS powered phone) and about women in open source, well not just in open source but in the programming environment also.&lt;br&gt;The latter transformed from a talk into a full-fledged debate about women in technical areas. Amazing debate and amazing people with different opinions and ideas!&lt;/p&gt;
&lt;p&gt;And thus the end came around. Pictures were made, hands were shaken, hugs were given and everybody left with a big smile on their face.&lt;/p&gt;
&lt;p&gt;In order to wrap this up, I would like to thank everyone that joined us on that lovely March day and especially to Andreea, for her guidance and the opportunity of allowing me to speak at the event she put together, Jakob for his guidance, friendship and awesome tech support and my girlfriend for putting up with me in that time frame.&lt;/p&gt;
&lt;p&gt;You can find bellow some goodies from the event, including my presentation, some pictures and the website where you can find it all.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://opensourceiasi.wordpress.com&quot;&gt;Mozilla Open Source Iasi&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://speakerdeck.com/stefanbc/mozilla-open-source-event-presentation-of-koding&quot;&gt;My presentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.flickr.com/photos/96641033@N05/sets/72157642498385555&quot;&gt;Some photos (credits by Andreea)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>open-source</category><category>speaking</category><category>mozilla</category><category>conference</category><category>episodes</category><category>travelling</category></item><item><title>How To: Setup a simple file server</title><link>https://stefancosma.xyz/2014/05/10/how-to-setup-a-simple-file-server</link><guid isPermaLink="true">https://stefancosma.xyz/2014/05/10/how-to-setup-a-simple-file-server</guid><description>The author of this tutorial should not be held responsible for any loss of data or hardware that one may encounter by following this tutorial. You have been inf</description><pubDate>Sat, 10 May 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;The author of this tutorial should not be held responsible for any loss of data or hardware that one may encounter by following this tutorial. You have been informed.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We’re developers! We have projects, a lot of projects. We don’t want to store the old ones on our dev machine, because you know, storage and organizing stuff is important. Oh, who am I kidding, go rent yourself 20TB of space at Amazon, you’ve earned it.&lt;/p&gt;
&lt;p&gt;But if you don’t want to do that, what can we do about it? A simple answer would be to get that crappy old machine you used to develop stuff in 9th grade and make a file server out of it.&lt;/p&gt;
&lt;p&gt;Whether you’re archiving your old projects, storing images of your ex or just downloading huge collections of cat videos, you’re in a point in time when your information is your main concern. You may have a large fast drive but that doesn’t mean you can keep all your information on it.&lt;/p&gt;
&lt;p&gt;Sure you can set up a cloud environment or an external hard-drive but that doesn’t mean you should. What if the internet goes down, or you lose the hard-drive and besides that who doesn’t love SSH and its ultimate supreme powers.&lt;/p&gt;
&lt;p&gt;That’s why in this “short little” tutorial, I’ll show you how to set up a basic file server using some basic knowledge of Linux commands, some magic and a lot of patience. Follow the steps bellow in order to complete this awesome “little challenge”.&lt;/p&gt;
&lt;h2&gt;Step 1 – Setup the USB drive&lt;/h2&gt;
&lt;p&gt;Get a hold of an old USB drive with at least 2GB of free space on it and a crappy old machine that is held together by duct-tape and your hopes and dreams. You already have them? Awesome. Plug in the USB drive in your computer (not your lame excuse of a machine) and let the awesomeness begin. We need to prepare for the setup ahead.&lt;/p&gt;
&lt;p&gt;Download the latest LTS of Ubuntu in the form of a mini version. You can use any other distro, but for this tutorial I’ll use Ubuntu 14.04 (I like to stay up to date). You can get one here or choose from the list here.&lt;/p&gt;
&lt;p&gt;After that, you need to download an app that allows you to set up the ISO on the USB drive. Due to the fact that it’s a minified version of the original ISO, it doesn’t have all the crap that the original Ubuntu has, it’s just basic Ubuntu. You can use this app for example, UNetbootin, to set up the ISO on the USB drive. Follow the steps bellow to write the ISO on the USB drive.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Open up the app.&lt;/li&gt;
&lt;li&gt;Select the Diskimage radio button.&lt;/li&gt;
&lt;li&gt;Choose the Ubuntu mini ISO you downloaded previously.&lt;/li&gt;
&lt;li&gt;Choose the USB drive.&lt;/li&gt;
&lt;li&gt;Click ok.&lt;/li&gt;
&lt;li&gt;You’re awesome!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After you finished writing the ISO on the USB drive, unplug it from your computer, and plug it into the machine you want to set up the file server on.&lt;/p&gt;
&lt;h2&gt;Step 2 – Install Ubuntu, the mini version&lt;/h2&gt;
&lt;p&gt;Now comes the fun part.&lt;br&gt;After you plugged the USB drive into your crappy machine, enter the BIOS setup and set the USB drive as the first boot device, save and boot from it. I can assume you already know how to do this.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;When the Installer boot menu comes up, select the first option, Install.&lt;/li&gt;
&lt;li&gt;Next choose the language, followed by selecting your location.&lt;/li&gt;
&lt;li&gt;You can choose to configure your keyboard or auto-detect it. In most cases you let it auto-detect by choosing No.&lt;/li&gt;
&lt;li&gt;The next step will ask you to set a hostname for your server. This name will identify your system on the network so you can access it more easily. Set a simple, recognizable name, like “the_google_server_for_ads”, because it’s a local network, you don’t need to worry about anyone making fun of it.&lt;/li&gt;
&lt;li&gt;The following step allows you to choose the mirror you want to download the updates /required files / libraries that the OS may need. Choose one based on your current location.&lt;/li&gt;
&lt;li&gt;Leave the PROXY field blank, because you’re on a local network. After the installer gets all the files it needs from that mirror, head over to the next step.&lt;/li&gt;
&lt;li&gt;The next screen will prompt you to reformat the hard disk. Let’s assume that you are going to use the whole hard disk, just select “Guided – use entire disk”. If you are not going to do that, you can select “Manual” and configure the partitioning accordingly.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Choose Yes to confirm the settings.&lt;/p&gt;
&lt;ol start=&quot;8&quot;&gt;
&lt;li&gt;Let the installer do this job.&lt;/li&gt;
&lt;li&gt;Next, choose a username and password for the new machine and then choose if you want to encrypt your home folder or not.&lt;/li&gt;
&lt;li&gt;Again, you let the installer do his job, because he’s a good installer and he knows his place.&lt;/li&gt;
&lt;li&gt;Do you want security updates installed? You sure do.&lt;/li&gt;
&lt;li&gt;The next step asks you to select the software you want to install. Select Ubuntu Server.&lt;/li&gt;
&lt;li&gt;You can install the GRUB loader on the master boot record.&lt;/li&gt;
&lt;li&gt;Unplug the bastard from the machine and reboot the machine.&lt;/li&gt;
&lt;li&gt;Et voilà! You have a new Ubuntu machine set up. You can now login.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Step 3 – Configuring Samba&lt;/h2&gt;
&lt;p&gt;It was fun until now, right?&lt;br&gt;Alright, but you need to allow access to this server from the network. How do you achieve this?&lt;/p&gt;
&lt;p&gt;You use Samba. It allows you tho share files between Ubuntu, Windows and Mac with no problem.&lt;/p&gt;
&lt;p&gt;Run the following commands, on your newly installed Ubuntu server machine, to install Samba:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo su
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Enter your root password.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apt-get install samba
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will install the Samba server on that machine.&lt;br&gt;After that you need to configure it. Run the following commands:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mkdir /home/%YOUR_USERNAME%/Public
chmod 777 /home/%YOUR_USERNAME%/Public 
cd 
gedit /etc/samba/smb.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can use any editor you want, of course.&lt;br&gt;The first thing you need to enable is the Windows support. Find the following line in the Global section and set it to yes.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[global]
  wins support = yes
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After that head over to the end of the file and add the following lines. Remember to replace %YOUR_USER% with your actual username.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[Public]
  comment = Public Folder
  path = /home/%YOUR_USERNAME%/Public
  browseable = yes
  read only = no
  guest ok = yes
  guest only = yes
  create mask = 0755
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Safe the file and reboot Samba using the following commands:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;restart smbd
restart nmbd
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That’s it for this step. Basically you should already see you machine on the network and perform actions inside that folder. Of course you can modify the options in the Samba config file as you please, but be careful before you do that.&lt;/p&gt;
&lt;p&gt;The last steps are optional and should be followed only if they are actually needed or if you want to have some fun and learn something useful.&lt;/p&gt;
&lt;h2&gt;Step 4 – Configuring SSH&lt;/h2&gt;
&lt;p&gt;Since it’s a local network and you don’t actually go out into the world with that server you can install OpenSSH, so you can manage it from your own computer instead of using a keyboard and a monitor connected to that machine.&lt;br&gt;On the server run the following command:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apt-get install openssh-server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and you’re done with the server, SSH is now installed. Now back on your own machine! If you’re using Ubuntu or Mac run the following commands in your Terminal.&lt;/p&gt;
&lt;p&gt;You need to generate a key that allows you to ssh into the server machine. Run the following command to generate one.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ssh-keygen -t rsa
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to avoid the login you can set up a configuration file. In your Terminal run:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd /home/%YOUR_USERNAME%/.ssh/
nano config
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;add the following line to the file and then save it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;User %THE_USERNAME_YOU_SET_ON_THE_SERVER%
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can now connect to your server via SSH using the following command and the correct IP address, that your server has on the network. You can find this, by visiting your Router dashboard or by heading over to the last step of this tutorial.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ssh 192.168.1.xx
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Head over to the next step for more useful commands that you can use on your server.&lt;/p&gt;
&lt;h2&gt;Step 5 – Bonus Commands&lt;/h2&gt;
&lt;p&gt;Besides the commands I have already mentioned in this post a while back. Here are some bonus ones that you can use to scan your network for other computers and to find your own IP.&lt;/p&gt;
&lt;p&gt;First you need to install a package that allows you to do that. Run the following command:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apt-get install arp-scan
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After that, you can scan the network using the following command, if the machine is on a WiFi network:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;arp-scan --interface=wlan0 --localnet
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or just&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;arp-scan -l
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;if it’s an LAN connection.&lt;/p&gt;
&lt;p&gt;Another useful command that is used to configure the system’s kernel-resident network interfaces is the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ifconfig
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And that was the end of this step.&lt;br&gt;Congratulations! You have finalized this tutorial! You are an awesome human being! :)&lt;/p&gt;
&lt;p&gt;I hope this tutorial was useful, because it was fun for me to write and to experience it. I spent a whole day trying to get this right on the first try. I had a really crappy old machine with only 256Mb of RAM, that for some weird reason didn’t die on me.&lt;/p&gt;
&lt;p&gt;Please, by all means correct any mistakes I might have made in this tutorial and please share your experience on this topic. What configurations do you use? Leave a comment below.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>setup-tag</category><category>server</category><category>tutorials</category><category>config</category><category>ubuntu</category><category>how-to</category></item><item><title>A hosting malfunction.</title><link>https://stefancosma.xyz/2014/04/26/a-hosting-malfunction</link><guid isPermaLink="true">https://stefancosma.xyz/2014/04/26/a-hosting-malfunction</guid><description>If you’re reading this article, it means the website is up and running as it’s supposed to.  I should put a notice like this everywhere, but why would I need to</description><pubDate>Sat, 26 Apr 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;If you’re reading this article, it means the website is up and running as it’s supposed to.&lt;/p&gt;
&lt;p&gt;I should put a notice like this everywhere, but why would I need to in the first place? If you’re a regular on my website, then you might have noticed some changes in the past week.&lt;/p&gt;
&lt;p&gt;A new design, some tweaks here and there but the most important thing of all is the fact that I have changed the hosting provider. Why would I need to do this?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The time has come! Switching hosting providers! *sigh*&lt;/p&gt;
&lt;p&gt;— Stefan Cosma (@stefanbc) &lt;a href=&quot;https://twitter.com/stefanbc/status/459380823079538688&quot;&gt;April 24, 2014&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;By the time I posted the above tweet, my website was down and my hosting account suspended because of one issue.&lt;/p&gt;
&lt;p&gt;It all started with an email I got. I received one of those automated emails, notifying me that CPU quota limit has been exceed. Weird! After some investigating, plugin disabling, cache enabling and some server monitoring I came to the conclusion that everything was good to go. I was so wrong!&lt;/p&gt;
&lt;p&gt;Two days later, boom, another similar email. Investigated the issue and tried optimizing the website even more than before.&lt;br&gt;All was good until one day when I was doing a random visiting on my website that I found out what happened. I have Port Monitor set up to notify me when something happens. I noticed something was different when I only got one email from Port Monitor telling me that the website was down. Usually I get 2 of them, one that says it’s down and another that says it’s up.&lt;/p&gt;
&lt;p&gt;It was a dreadful 403, a developers nightmare! Alright it was time to take action.&lt;br&gt;Opened up a support ticket on the hosting provider’s website and 5 hours later got a response. I should mention that I had only an old local backup of my website and I asked them to activate my account so I can at least backup it up properly. I managed to back it up properly and after 20 mins it was suspended again.&lt;/p&gt;
&lt;p&gt;I knew I had to do something about this so I started looking for a different hosting provider. After many hours of searching and reading reviews I found one.&lt;/p&gt;
&lt;p&gt;I immediately started moving everything to the new hosting but there was a problem. The old account was suspended so I could not access it and remove it so I could register the domain to the new hosting. Ticket time again. They fixed the issue and 1 hour later all was set up on the new hosting. But…&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;DNS propagation, I loathe thy! :(&lt;/p&gt;
&lt;p&gt;— Stefan Cosma (@stefanbc) &lt;a href=&quot;https://twitter.com/stefanbc/status/459419796887851008&quot;&gt;April 24, 2014&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It was 1am when everything was back to normal. After almost 24 hours of inactivity it was then and there I decided it was time for a new look, a new start.&lt;/p&gt;
&lt;p&gt;So what can we learn from this story? For starters, choose your hosting provider carefully. Chose one that can resolve your issues quickly without any hassle, that can provide easy solutions and best of all on that suits your needs, and if all else fails you can always set up your own VPS!&lt;/p&gt;
&lt;p&gt;I hope you won’t have to go through all the stuff that I went through to get my website up and running properly but if you already did I would love to hear your story. Just drop a line down below!&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>errors</category><category>hosting</category><category>hello-world</category><category>article</category></item><item><title>Reading other people&apos;s code.</title><link>https://stefancosma.xyz/2014/04/05/reading-other-peoples-code</link><guid isPermaLink="true">https://stefancosma.xyz/2014/04/05/reading-other-peoples-code</guid><description>It&apos;s more of a question actually. What&apos;s it like to read other&apos;s people code and why you should be prepared?  Well, the evil doers over at the powerful and evil</description><pubDate>Sat, 05 Apr 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;It&amp;#39;s more of a question actually. What&amp;#39;s it like to read other&amp;#39;s people code and why you should be prepared?&lt;/p&gt;
&lt;p&gt;Well, the evil doers over at the powerful and evil Abstruse Goose Corporation made &lt;a href=&quot;http://abstrusegoose.com/432&quot;&gt;this into a bloody good comic&lt;/a&gt;. Go read it and then come back, so we can understand what&amp;#39;s really going on here.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;waiting for the reader to come back&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Well if you made it to this sentence it means we can continue with our philosophical pondering of random stuff about computer programming.&lt;/p&gt;
&lt;p&gt;In order to answer our questions we first have to look at the standards of code writing. I&amp;#39;m not referring to language standards but to actual writing of code. The developer community has standards, in terms of code writing, right?&lt;/p&gt;
&lt;p&gt;We can all agree that we do, in some way or another. The problem with these standards it that there is no proper authority that tells the developer how to write his or hers code.&lt;/p&gt;
&lt;p&gt;The lack of proper standardization from developers is appalling. Yes, if you work in a big company, you have certain guide lines that you must follow, but if you&amp;#39;re an open source developer, like most of us are these days, then you don&amp;#39;t give a rats ass about guide lines, because you write code the way you feel comfortable writing code.&lt;/p&gt;
&lt;p&gt;Maybe you&amp;#39;re opening the brackets on a new line after the class name, maybe you&amp;#39;re using tabs instead of spaces and above all that you use 4 tabs.&lt;/p&gt;
&lt;p&gt;As much as I hate to play devil&amp;#39;s advocate, with myself, contradicting my own words, I have to agree that all of the above are standards that people adhere to. There are standards, but there&amp;#39;s too many of them and people still write code the way they feel comfortable.&lt;/p&gt;
&lt;p&gt;Unity. That is what we need. We need people to collaborate more than they do now. Github is doing a marvelous job at this. How come?&lt;/p&gt;
&lt;p&gt;Well imagine forking a project, modifying it and making a pull request. You, for the sake of the project and others like you write the code in the original style. Or maybe someone else has this job of formatting all the code in that project. But let&amp;#39;s get back to collaboration.&lt;/p&gt;
&lt;p&gt;Why is collaboration so important? Because the more you talk and work together with other developer the more you learn from them, they learn from you and both sides start using the same style of writing and conceptual thinking.&lt;/p&gt;
&lt;p&gt;You start to write code with a style that is shared by your developer friends / collaborators. As everything these days, unity and standardization also have a different side. When you apply unity and standardization you automatically take out the individualism of each person and you create a kind of dictatorship out of code writing.&lt;/p&gt;
&lt;p&gt;If everyone would conform to the same style of writing code, we&amp;#39;d be North Korea of code writing. And we don&amp;#39;t want that don&amp;#39;t we? It&amp;#39;s a treacherous path to follow, this standardization of code writing, and in the end it&amp;#39;s a matter of choice for each developer.&lt;/p&gt;
&lt;p&gt;So, in order to answer our questions we had to look at the way people work and the conclusion we can come to is this: reading other people&amp;#39;s code is a bad if you don&amp;#39;t have enough experience in the field. You should be prepared to read, interpret and think like the original developer of the code, because it all revolves around your ability to adapt to certain situations. But the human race is built to adapt and you should have no problem in deciphering some lines of code.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>questions</category><category>standards</category><category>developers</category><category>code</category><category>experience</category><category>reading</category><category>article</category></item><item><title>Are we too dependent of the tools we use?</title><link>https://stefancosma.xyz/2014/04/01/are-we-too-dependent-of-the-tools-we-use</link><guid isPermaLink="true">https://stefancosma.xyz/2014/04/01/are-we-too-dependent-of-the-tools-we-use</guid><description>A few weeks ago, I had the unfortunate chance or let&apos;s say \&quot;opportunity\&quot;, of working on something without going through my usual workflow. And what did I learn</description><pubDate>Tue, 01 Apr 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A few weeks ago, I had the unfortunate chance or let&amp;#39;s say &amp;quot;opportunity&amp;quot;, of working on something without going through my usual workflow. And what did I learn from that experience?&lt;/p&gt;
&lt;p&gt;Well, that you are as good as the tools you use and the most important thing, that stuck with me, is that the whole process sucked. And when I mean it sucked, I mean it was so horrible that I felt I was in the middle ages, where they had to copy books by hand. I mean not only was I out of my comfort zone, but as strange as that may sound, I started with my mind-set on doing something out of my comfort zone.&lt;/p&gt;
&lt;p&gt;As developers, we have an established workflow and we usually stick to that until something better comes along. But if for some weird reason that workflow is suddenly broken, by some unfortunate events, we are left stranded like Tom Hanks in Cast Away.&lt;/p&gt;
&lt;p&gt;So, are we too dependent on the tools we use? I would say yes. Why? Well, for one simple reason. Just a like a blacksmith needs a hammer to forge an armor, we also need a code editor and a terminal to create something.&lt;/p&gt;
&lt;p&gt;But this can be a two-sided blade. On one hand, the tools we use, help us make great things, that we can share with the rest of the world, and there is also a &amp;quot;dark&amp;quot; side to this.&lt;/p&gt;
&lt;p&gt;If we get too attached to these tools we might not be able to evolve. And it&amp;#39;s in the human nature to evolve.&lt;/p&gt;
&lt;p&gt;How can we overcome this? Well for starters try using / testing a different set of tools. Lets take for example a code editor.&lt;/p&gt;
&lt;p&gt;We all have that favorite one. Whether it&amp;#39;s Sublime, Coda or whatever, we all have that special one.&lt;/p&gt;
&lt;p&gt;My advice is to try using not one, but two or three on a regular basis, just to make yourself comfortable with as many environments as possible.&lt;/p&gt;
&lt;p&gt;Use Sublime, Atom, Brackets or even an online one, like the one Koding has, which is based on Ace. That way you won&amp;#39;t feel so uncomfortable when, lets say, you change you job and the new job has a mandatory code editor that you need to use.&lt;/p&gt;
&lt;p&gt;Alright, but, that&amp;#39;s not all. Try changing your workflow from time to time. Yes, I am aware that you can be unproductive if you do this way to often, nevertheless a change is always welcome, if it&amp;#39;s for the better. I for one, try to change my workflow, at least once a year, by introducing new tools and getting rid of the old ones.&lt;/p&gt;
&lt;p&gt;A good example would be, on my Windows machine, I used to use the GUI version of Github but now it&amp;#39;s all command line.&lt;/p&gt;
&lt;p&gt;So, what&amp;#39;s the conclusion? I believe that no matter how dependent you are of the tools you use, it&amp;#39;s important to remember one thing: the tools you use were made my developers, like you and me, and some of them may be good or some of them may be bad, but as long as they work for your projects, you feel comfortable using them and you&amp;#39;re productive, then you can be as dependent as you want of them.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>questions</category><category>tools</category><category>sublime-text</category><category>code-editor</category><category>workflow</category><category>article</category><category>development</category></item><item><title>When is autoplay music acceptable on a website?</title><link>https://stefancosma.xyz/2014/03/21/when-is-autoplay-music-acceptable-on-a-website</link><guid isPermaLink="true">https://stefancosma.xyz/2014/03/21/when-is-autoplay-music-acceptable-on-a-website</guid><description>Interesting question, don&apos;t you agree? I would like debate a bit about this subject, because I ran a poll on Twitter and I believe we all encountered this on ou</description><pubDate>Fri, 21 Mar 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Interesting question, don&amp;#39;t you agree? I would like debate a bit about this subject, because I ran a poll on Twitter and I believe we all encountered this on our endless endeavors around the Internet realm.&lt;/p&gt;
&lt;p&gt;Music. Love it or hate it, it&amp;#39;s a part of our lives. It doesn&amp;#39;t matter if you&amp;#39;re an avid listener or just the average Joe that listens to it occasionally, the point is that music is all around us.&lt;/p&gt;
&lt;p&gt;Just open up a window, close your eyes and hear the world. But our lives are split between a life we have in the outside world and one in the world we call the Internet. And believe it or not, there is music on the Internet, and lots of it. Mind blow, right? My thoughts exactly.&lt;/p&gt;
&lt;p&gt;We have a lot of websites that let you listen to music directly online and that&amp;#39;s nice and all but what happens when we encounter a website that is not a music streaming service, but it has music playing in the background? You close the tab and move on with your life. Haha, I wish it were that easy.&lt;/p&gt;
&lt;p&gt;For some it might be, but that&amp;#39;s why I ran a poll and wanted to get others opinion on this. You can comment on this article, because I would like to see what you think about this.&lt;/p&gt;
&lt;p&gt;First of all I would like to say that it&amp;#39;s the client&amp;#39;s fault for all this debating. If a client wants something, chances are the developer or the agency will comply and implement those requests. So if the client wants music on his/her website he or she will get music on said website. Do we, as developers and ordinary people, find this acceptable? Well some of us do, some of us don&amp;#39;t.&lt;/p&gt;
&lt;p&gt;According to the poll, 81% of you said that background music that autoplays is unacceptable and you hate it.&lt;/p&gt;
&lt;p&gt;There are two paths here. One is to a have a button and let the user choose if they want music or not or just autoplay the bastard. Usually it&amp;#39;s the latter, but there are some exceptions.&lt;/p&gt;
&lt;p&gt;Alright, but what about the rest of the results? 19% of you said that you find it acceptable sometimes, eg. a Chrome Experiment, and 0% said it was acceptable. Chrome Experiment.&lt;/p&gt;
&lt;p&gt;My opinion of the matter is as follows. As long as I expect something to be interactive and has the word experiment in its title I automatically assume it may have music in the background, so I turn my normal music down, but in some cases when I came over a random website that has songs of birds and rivers in the background that autoplays, I immediately close the tab in question.&lt;/p&gt;
&lt;p&gt;Why? Well, because knowing that something is thought of as an experiment, implies the fact that the guys and gals behind it, experimented with video as well as audio. But if something has the word flower in its title, I won&amp;#39;t expect it to have music in the background. That is just my opinion on the matter, but I would like this discussion to go further. What are your thoughts on this?&lt;/p&gt;
&lt;p&gt;Is autoplay music acceptable on a website disregarding the title?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;PS. You can find the poll results &lt;a href=&quot;http://votes.io/sad8&quot;&gt;here&lt;/a&gt; and still vote. :)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>questions</category><category>debate</category><category>clients</category><category>rant</category><category>music</category><category>developers</category><category>polls</category></item><item><title>Maps API or X marks the spot.</title><link>https://stefancosma.xyz/2014/01/06/maps-api-or-x-marks-the-spot</link><guid isPermaLink="true">https://stefancosma.xyz/2014/01/06/maps-api-or-x-marks-the-spot</guid><description>No, we&apos;re not making fun of Apple Maps, but we could if we wanted to. Let&apos;s just say I don&apos;t want to jump wink wink into the whole Apple Maps conundrum.  This a</description><pubDate>Mon, 06 Jan 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;No, we&amp;#39;re not making fun of Apple Maps, but we could if we wanted to. Let&amp;#39;s just say I don&amp;#39;t want to jump &lt;em&gt;wink wink&lt;/em&gt; into the whole Apple Maps conundrum.&lt;/p&gt;
&lt;p&gt;This article, in particular, is focused on describing my adventures with Apple Maps&amp;#39;s older and more experienced brother, Google Maps.&lt;/p&gt;
&lt;p&gt;Now, I&amp;#39;m sure you don&amp;#39;t want to know how Google Maps came to be, I mean you can read that on Wiki, right? Lets get down to the nitty-gritty! Along my years as a developer I&amp;#39;ve had my fair share of experiences with the Google Maps API.&lt;/p&gt;
&lt;p&gt;It all started on one summer morning. It was hot outside and the AC was running full steam. &lt;em&gt;bing&lt;/em&gt; rang the email notification at the bottom of my screen. Oh look, a new project! As I read the short brief, I understood then and there that I would soon dive in the cumbersome world of the Maps API. And that was the beginning!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Tip: If you understand the Maps API from the very beginning, you won&amp;#39;t have any trouble later on.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The basic principle of the Maps API is that you have a container and in that container, the map is loaded using JS. On top of that you can add an extra layer of interaction to the map, you can add markers.&lt;/p&gt;
&lt;p&gt;The idea behind markers is that you can interact with them and point a user to a predefined location on the map. For example you have a website that promotes local businesses. But how can we achieve this, without staying too late and miss out beaut sleep? Well it&amp;#39;s quite simple (It always is!). First of all we need to create a simple container, like the one below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&amp;quot;map-canvas&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After we have this container, on our page, we can go ahead and start loading the Maps API. I should mention that for the sake of this example we are going to use jQuery to load some stuff, but don&amp;#39;t worry there are other ways you can do this. In the head part of our page or in a different .js file we start initializing the map. We do this by using some basic JS.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
    var infowindow;
    var map;
    function initialize() {
        var mapOptions = {
            zoom: 13,
            minZoom: 13,
            center: new google.maps.LatLng(LATITUDE,LONGITUDE),
            panControl: false,
            zoomControl: true,
            zoomControlOptions: {
                style: google.maps.ZoomControlStyle.DEFAULT
            },
            mapTypeControl: false,
            scaleControl: false,
            streetViewControl: false,
            overviewMapControl: false,
            mapTypeId: google.maps.MapTypeId.ROADMAP,
            scrollwheel: false
        };
        jQuery.get(&amp;quot;markers.php&amp;quot;, function(data) {
            jQuery(data).find(&amp;quot;marker&amp;quot;).each(function() {
                var eachMarker = jQuery(this);
                var markerCoords = new google.maps.LatLng(
                    parseFloat(eachMarker.find(&amp;quot;Latitude&amp;quot;).text()),
                    parseFloat(eachMarker.find(&amp;quot;Longitude&amp;quot;).text())
                );
                var name = eachMarker.find(&amp;quot;Name&amp;quot;).text();
                var url = eachMarker.find(&amp;quot;URL&amp;quot;).text();
                var html = &amp;quot;&amp;lt;a href=&amp;#39;&amp;quot; + url + &amp;quot;&amp;#39; title=&amp;#39;&amp;quot; + name + &amp;quot;&amp;#39;&amp;gt;&amp;quot; + name + &amp;quot;&amp;lt;/a&amp;gt;&amp;quot;;
                var marker = addMarker(html, markerCoords);
            });
        });

        map = new google.maps.Map(document.getElementById(&amp;#39;map-canvas&amp;#39;), mapOptions);
    }

    function addMarker(html, markerCoords) {
        var marker = new google.maps.Marker({
            animation: google.maps.Animation.DROP,
            map: map,
            position: markerCoords
        });

        google.maps.event.addListener(marker, &amp;quot;click&amp;quot;, function() {
            if (infowindow) infowindow.close();
            infowindow = new google.maps.InfoWindow({
                content: html,
                minHeight: 300
            });
            infowindow.open(map, marker);
        });
        return marker;
    }

    function loadScript() {
        var script = document.createElement(&amp;#39;script&amp;#39;);
        script.type = &amp;#39;text/javascript&amp;#39;;
        script.src = &amp;#39;https://maps.googleapis.com/maps/api/js?v=3.exp&amp;amp;sensor=false&amp;amp;callback=initialize&amp;#39;;
        document.body.appendChild(script);
    }
    window.onload = loadScript;
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ok, but what does the code above mean? For starters, we need some basic variables to hold the map itself and the info box for each marker.&lt;/p&gt;
&lt;p&gt;The first function initializes the map with the options we want. These options can have a great impact on the map itself. I should mention that the ones mentioned in the code are not all the ones available, those are just the ones I find the most useful.&lt;/p&gt;
&lt;p&gt;One important thing to remember is that the center map option, that needs longitude and latitude, is required when initializing a map. Without it, the map would be all over the place and we don&amp;#39;t want that, do we? The next bit of code is for loading the markers. We achieve this by using jQuery, an external php file that outputs some XML and another JS function that creates the marker and adds the info box to each one of the markers.&lt;/p&gt;
&lt;p&gt;We&amp;#39;re using jQuery&amp;#39;s &lt;em&gt;get&lt;/em&gt; function to achieve this, but as I said earlier, you can use what ever you&amp;#39;d like to load the markers, this is just a solution I use.&lt;/p&gt;
&lt;p&gt;After all this is done, we generate the map object, using the already created container and applying the map options. Each marker is generated from an XML output, but to add it to the map we go through all of them and call the &lt;em&gt;addMarker&lt;/em&gt; function to add the info box.&lt;/p&gt;
&lt;p&gt;After that we add them to the map, using the coordinates available. Basically each marker is an object that we add to the main object, which is the map. Last but not least, we load the actual Maps API using some basic JS. You may have noticed that I skipped the loading markers step. Well that&amp;#39;s because that is a whole different story.&lt;/p&gt;
&lt;p&gt;For this particular example I&amp;#39;m going to use the version of the &lt;em&gt;markers.php&lt;/em&gt; file that I use in WordPress. This means that I use basic WordPress functions and some things that you may blame me for using, but I don&amp;#39;t care about that at the moment because this is not a production project.&lt;/p&gt;
&lt;p&gt;Before we begin, I should mention that I use the &lt;a href=&quot;http://wordpress.org/plugins/advanced-custom-fields/&quot;&gt;Advanced Custom Fields plugin&lt;/a&gt; to add a location field to a post. The latest versions of this plugin come with a Google Maps field that you can generate and add as a field just like you would with other custom fields.&lt;/p&gt;
&lt;p&gt;Ok, so the basic concept of this markers loading is that we query for posts and we get the name, coordinates and the url, after that jQuery can come in and get them. These are just some basic stuff you can get. You can grab all sorts of stuff from a post, you&amp;#39;re imagination or requirements are the limit.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php
    header(&amp;#39;Content-type: text/xml&amp;#39;);
    $parse_uri = explode( &amp;#39;wp-content&amp;#39;, $_SERVER[&amp;#39;SCRIPT_FILENAME&amp;#39;] );
    require_once ($parse_uri[0] . &amp;#39;wp-load.php&amp;#39;);

    echo &amp;#39;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;#39;;
        echo &amp;#39;&amp;lt;markers&amp;gt;&amp;#39;;
            $query = new WP_Query(array(
                &amp;#39;post_type&amp;#39; =&amp;gt; &amp;#39;post&amp;#39;,
                &amp;#39;posts_per_page&amp;#39; =&amp;gt; &amp;#39;-1&amp;#39;
            ));
            while ($query-&amp;gt;have_posts()) : $query-&amp;gt;the_post();
                $location = get_field(&amp;quot;location&amp;quot;);
                if ($location[&amp;#39;address&amp;#39;] != &amp;quot;&amp;quot;) {
                    $marker = &amp;#39;&amp;#39;;
                        $marker .= &amp;#39;&amp;#39; . get_the_title() . &amp;#39;&amp;#39;;
                        $marker .= &amp;#39;&amp;#39; . trim($location[&amp;#39;lat&amp;#39;]) . &amp;#39;&amp;#39;;
                        $marker .= &amp;#39;&amp;#39; . trim($location[&amp;#39;lng&amp;#39;]) . &amp;#39;&amp;#39;;
                        $marker .= &amp;#39;&amp;#39; . get_permalink() . &amp;#39;&amp;#39;;
                    $marker .= &amp;#39;&amp;#39;;
                    echo $marker;
                }
            endwhile;
            wp_reset_query();
        echo &amp;#39;&amp;lt;/markers&amp;gt;&amp;#39;;
?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ignoring the second and the third row, we start generating our XML output. Using the basic WP_query function, available in WordPress, we query for posts and we get all of them, but you can play with this as you please.&lt;/p&gt;
&lt;p&gt;If we have posts, we go through each one of them and start outputting.&lt;br&gt;The beauty of the ACF plugin is that it provides a simple function (The get_field function!) to get the field values for a post and with that data you can do what ever you want. In this case we have an array that contains the latitude, longitude and the address. All we need is the latitude and longitude. The basic get_the_title and get_permalink functions are also present.&lt;/p&gt;
&lt;p&gt;We reset the query and close the XML. Now, jQuery can come in and grab each marker and add it to the map.&lt;/p&gt;
&lt;p&gt;And there you have it, simple and easy Google Maps API integration with marker loading.&lt;/p&gt;
&lt;p&gt;I hope this “short” tutorial was easy to understand. This was my version of Google Maps API integration for WordPress and if you have any suggestions / comments just tell me.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>integration</category><category>apple-maps</category><category>php</category><category>google-maps-api</category><category>code</category><category>tutorials</category><category>js</category></item><item><title>Developers and holidays. A weird relationship?</title><link>https://stefancosma.xyz/2013/12/20/developers-and-holidays-a-weird-relationship</link><guid isPermaLink="true">https://stefancosma.xyz/2013/12/20/developers-and-holidays-a-weird-relationship</guid><description>&apos;tis the holiday season! Maybe you&apos;re coming or going home for the holidays. Whatever maybe the case, you rejoice the fact that you finally have a break from al</description><pubDate>Fri, 20 Dec 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&amp;#39;tis the holiday season! Maybe you&amp;#39;re coming or going home for the holidays. Whatever maybe the case, you rejoice the fact that you finally have a break from all the stuff that happened this year.&lt;/p&gt;
&lt;p&gt;It doesn&amp;#39;t matter how well this year went, what&amp;#39;s important is that it&amp;#39;s all over (Even if you don&amp;#39;t want it to be!). We&amp;#39;re developers and people say we are a special breed of people (Or so I&amp;#39;ve heard over the years!), and some of us (If not all!) are geeks (and some are even nerds!&lt;/p&gt;
&lt;p&gt;But we don&amp;#39;t like labels!) and we&amp;#39;re proud of it. We wear this badge with pride even if people mock us for our enthusiasms when somebody makes a new discovery using CSS or does some crazy experiment with HTML5 (I&amp;#39;m looking at you Chrome Experiments!).&lt;/p&gt;
&lt;p&gt;But what do developers like to do for the holidays? Well a &lt;a href=&quot;http://www.explosm.net/comics/2898/&quot;&gt;certain comic&lt;/a&gt; strip comes to mind that can sum it up perfectly.&lt;/p&gt;
&lt;p&gt;If you followed the link to the comic you&amp;#39;ll know what I mean. Because of the social awkwardness that some of us have, we  don&amp;#39;t actually know what else to do when the holiday season comes. I&amp;#39;m not saying we don&amp;#39;t socialize, I&amp;#39;m just saying that we just prefer the company of other fellow developers over the medium of the interwebs. It&amp;#39;s a lot more fun to just stay at home and figure out a way to add holiday cheer to all your apps and code, maybe with the help of your other fellow developers. You enjoy spending time figuring out a new way to create a Santa hat using just one &lt;em&gt;div&lt;/em&gt; tag.&lt;/p&gt;
&lt;p&gt;As Pablo points out in his &lt;a href=&quot;http://www.stanleycolors.com/2013/12/geeks-celebrate-xmas/&quot;&gt;comic&lt;/a&gt;, maybe you enjoy doing funny stuff to your blog, like adding some snow using CSS or a Santa hat to your logo using :before or :after.&lt;/p&gt;
&lt;p&gt;These are stuff we enjoy doing and nobody can tell us different. But developers are humans and we do have families (and some of us even have girlfriends / boyfriends) and these families need some material compensation for putting up with our shit all year-long, that&amp;#39;s why we like to do our shopping online and get it delivered to our doorstep.&lt;/p&gt;
&lt;p&gt;We also like to order stuff for ourselves for the holidays because that&amp;#39;s how we roll.&lt;/p&gt;
&lt;p&gt;Usually our wishlist contains stuff like the latest in books for developers written by developers, some super expensive gadgets, that we&amp;#39;re going to use a few weeks and then forget about it.&lt;/p&gt;
&lt;p&gt;Ok, now that we&amp;#39;re done with the shopping we start placing hints for other people to see what we want to receive for the holidays, even if we already got ourselves a whole bunch a stuff in the first places.&lt;/p&gt;
&lt;p&gt;You may ask yourself at this point in the article, do developers actually celebrate something when the holiday season comes for the rest of the world? Well it&amp;#39;s a good question, my dear friend. Because we are surrounded by all the technology and we have all the information available in the world at the bottom of our fingertips we have a certain point of view when it comes to the holidays.&lt;/p&gt;
&lt;p&gt;We acknowledged the evolution theory, quantum physics and string theory but for some reason we still like to celebrate something that started out as a pagan ritual. On the other hand we don&amp;#39;t like to acknowledged the existence of certain bearded figure because the numbers wouldn&amp;#39;t add up and it would be practically impossible for anyone to perform such a feat of strength and endurance in a single night.&lt;/p&gt;
&lt;p&gt;So, in order to wrap this up on a positive note, I would say that we as developers have a certain way of doing things, even when it comes to celebrating something. I wouldn&amp;#39;t label it as weird, just different and it&amp;#39;s a shame because so many people misunderstand this concept and start pointing fingers, but that&amp;#39;s just the human race, we like to point stuff out if they are out of the ordinary.&lt;/p&gt;
&lt;p&gt;That is all. Until next time (whenever that is!), code long, prosper and Happy Holidays!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>developers</category><category>fun-stuff</category><category>weird</category><category>comics</category><category>article</category></item><item><title>Monitoring all the stuff!</title><link>https://stefancosma.xyz/2013/12/16/monitoring-all-the-stuff</link><guid isPermaLink="true">https://stefancosma.xyz/2013/12/16/monitoring-all-the-stuff</guid><description>Despite the fact that we are being monitored day and night by an entity that knows almost everything (even what we had for brunch on Nov. 5), and yes I&apos;m talkin</description><pubDate>Mon, 16 Dec 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Despite the fact that we are being monitored day and night by an entity that knows almost everything (even what we had for brunch on Nov. 5), and yes I&amp;#39;m talking about moon people, we still have an unsatisfied need of knowing what happens to our belongings.&lt;/p&gt;
&lt;p&gt;Be it a website or a web app, we need to know what happens with it, while we are away, disconnected from the interwebs. But often we ask ourselves how can we achieve this without paying a dime?&lt;/p&gt;
&lt;p&gt;Luckily, nowadays there are a lot of tools that can help us in our quest for monitoring stuff, and when I mean stuff I don&amp;#39;t mean that website you build in the 9th grade for Mister Snookums.&lt;/p&gt;
&lt;p&gt;Right, let&amp;#39;s get to it then. What do we have available at the moment and what works out of the box? Here&amp;#39;s a short list I made with the ones I find more useful:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://newrelic.com&quot;&gt;New Relic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.port-monitor.com&quot;&gt;Port Monitor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jetpack.me/support/monitor/&quot;&gt;Jetpack monitor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://isup.me&quot;&gt;isup.me&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Ok. Now lets see what each one does and if it&amp;#39;s any good.&lt;/p&gt;
&lt;h2&gt;New Relic&lt;/h2&gt;
&lt;p&gt;We all saw the ads and some of us even got a shirt from these guys, and so the question arises, are they any good? At first glance you might think that this tool is for sysops only. And you may be right to some degree. The guys and gals at New Relic simplified the whole monitoring your server process.&lt;/p&gt;
&lt;p&gt;They made it in a such a way that anyone who knows how to open up a terminal or command line and type, can install the monitoring daemon and start monitoring their web app or website (And yes there is a difference between the two!). The amount of information that these guys can gather, from your server or app, is amazing.&lt;/p&gt;
&lt;p&gt;Everything is monitored and is presented in a pretty nice UI and on top of it all its customizable, so you can checkout only the stuff you&amp;#39;re interested in. CPU usage, memory usage, bandwidth usage, are among the few things that the guys at New Relic have prepared to monitor.&lt;/p&gt;
&lt;h2&gt;Port Monitor&lt;/h2&gt;
&lt;p&gt;is the brainchild of Francis Yáñez. This tool basically does what the name says and more. You can use it for website monitoring and server monitoring.&lt;/p&gt;
&lt;p&gt;It also records uptime, response times (performance) and downtime causes. The awesome thing about this app is that you can generate your own custom reports and each time something happens it will email you the cause.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been using it for some time now and it is super accurate. I mean it sends me emails for stuff that happen to this website (and stuff do happen, believe you me!) in a matter of minutes, and I always see what usually causes the downtime (It&amp;#39;s usually the host provider!). As featured on its main page you can see a short list of the features that Port Monitor has:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check websites status&lt;/li&gt;
&lt;li&gt;Monitor for content changes&lt;/li&gt;
&lt;li&gt;Ping servers to test if they are alive&lt;/li&gt;
&lt;li&gt;Check any service with custom TCP ports&lt;/li&gt;
&lt;li&gt;Monitor DNS records&lt;/li&gt;
&lt;li&gt;Automatic checks every 60 seconds&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I would say that these are more than enough for a free service that on top of it all offers an API and is developer friendly.&lt;/p&gt;
&lt;h2&gt;Jetpack Monitor&lt;/h2&gt;
&lt;p&gt;The Monitor extension for Jetpack is one of the new kids on the block. This monitoring app is targeted towards WordPress websites, because as you may know Jetpack is a WordPress plugin that offers similar features to self hosted WordPress websites as the ones hosted on WordPress.com.&lt;/p&gt;
&lt;p&gt;Clicky, clicky and Jetpack is installed. Activating the Monitor extension is as easy as typing this word. After you&amp;#39;ve done all this the Jetpack servers will start checking your site every five minutes. Which is good, because you&amp;#39;ll get an email that says either Bad News or Good News.&lt;/p&gt;
&lt;h2&gt;isup.me&lt;/h2&gt;
&lt;p&gt;We all know you&amp;#39;re busy like a bee, but what if you&amp;#39;re away from your computer and you get an email from a friend that says: &amp;quot;Hey man, is it just me or your awesome website is down?&amp;quot;, what happens then? Well you can use isup.me and see if the website is actually down or it&amp;#39;s just him.&lt;/p&gt;
&lt;p&gt;Of course it was just him!&lt;/p&gt;
&lt;h2&gt;Bonus Apps&lt;/h2&gt;
&lt;h3&gt;&lt;a href=&quot;http://hurl.it&quot;&gt;hurl.it&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Not really a monitoring app but you can use it to make GET / POST / PUT / PATCH / HEAD / OPTIONS / DELETE requests. You can also add parameters or authentication to your request. Useful on many occasions when you just want to a test a certain output of some feature you&amp;#39;re currently building.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;http://builtwith.com&quot;&gt;builtwith.com&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;And last but now least, our last mention of the day is not really related to the ones above but it&amp;#39;s useful because you can check the technologies behind a website.&lt;/p&gt;
&lt;p&gt;For example did you know that isup.me is built using Ruby? Or that YouTube uses Joomla (Wait what?).&lt;/p&gt;
&lt;p&gt;One more thing before I sign off, some of these tools are really useful for anyone that has a website they want to keep an eye on, so my advice is to go and check them out because they are worth it.&lt;/p&gt;
&lt;p&gt;Alrighty then, hope I haven&amp;#39;t bored you to death, If you know any more tools, that I forgot to add to the list, please let me know in the comments.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;p&gt;&lt;em&gt;*Note: This article has not been sponsored in any way by the services mentioned above (But if they want to, I don&amp;#39;t mind!).&lt;/em&gt;&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>useful</category><category>tools</category><category>apps-tag</category><category>basics</category><category>advice</category></item><item><title>The great category conundrum.</title><link>https://stefancosma.xyz/2013/12/13/the-great-category-conundrum</link><guid isPermaLink="true">https://stefancosma.xyz/2013/12/13/the-great-category-conundrum</guid><description>It all started on one December-ish looking morning. It was the year of our lord 2013 and the snow was nowhere to be found, keeping that mind, there was a slight</description><pubDate>Fri, 13 Dec 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;It all started on one December-ish looking morning. It was the year of our lord 2013 and the snow was nowhere to be found, keeping that mind, there was a slight smell of bugs in the air. You know the type I&amp;#39;m talking about? The ones that don&amp;#39;t let you sleep at night and make you go to bed at 2AM. Those kind of bugs. Thankfully the so-called &amp;quot;bug&amp;quot;, I am going to describe in the rows below, is not one of those.&lt;/p&gt;
&lt;p&gt;This was a simple one. One that started from the bottom, from the inner core of all that is holly and peaceful. So what is then?&lt;/p&gt;
&lt;p&gt;How in the world do you get a category that has a certain parent for a post (either specific post or the current one)? Yes it&amp;#39;s a simple question but if you close enough you&amp;#39;ll see that none of the WordPress inner core function offer a direct solution.&lt;/p&gt;
&lt;p&gt;Well after a long quest on the realm of the interwebs I came across many that claimed they had the answer but all of them were shams. In the end I managed to gather enough knowledge to come up with a slight deviation of a solution I found along my voyage. You can check it out below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Save the names and the IDs of the parent categories you want in an array
$parents = array(
   &amp;#39;NAME_OF_PARENT_CATEGORY&amp;#39; =&amp;gt; ID_OF_THE_CATEGORY
);
// The the categories of the current post
$categories = get_the_terms( $post-&amp;gt;ID, &amp;#39;category&amp;#39; );

// Output parent categories and their children
foreach( $parents as $parent_name =&amp;gt; $parent_id ):
    // Output the parent name
    echo $parent_name;
    // Create an array to hold the children
    $links = array();
    foreach( $categories as $category ):
        if( $parent_id == $category-&amp;gt;parent ):
            // Put the category link in the array
            $links[] = &amp;#39;&amp;lt;a href=&amp;quot;&amp;#39; . get_term_link( $category ) . &amp;#39;&amp;quot;&amp;gt;&amp;#39; . $category-&amp;gt;name . &amp;#39;&amp;lt;/a&amp;gt;&amp;#39;;
        endif;
    endforeach;
    // Join everything and output it
    echo join( &amp;#39;, &amp;#39;, $links );
 endforeach;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ok, now let&amp;#39;s try to understand this snippet of code. For the sake of this tutorial lets say we have a review website that covers places to eat, places to drink and places to have fun. Each one of those categories is a general one, and we have a business that is categorized with restaurants (that has the parent, places to eat) and others, like location and availability, that have different parents. So we have 3 categories on the same post and we need to output only the one that belongs to places to eat.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;First we create an array for the parents, because maybe we have multiple categories and we need the children for all of them.&lt;/li&gt;
&lt;li&gt;Ok, after that we get all the categories of the current post (eg. restaurant, location, availability).&lt;/li&gt;
&lt;li&gt;We go through the parent categories that we set up on step one (eg. places to eat, places to drink, places to have fun).&lt;/li&gt;
&lt;li&gt;While we are doing that we build another array where we will keep the children.&lt;/li&gt;
&lt;li&gt;The next step is to go through all the categories of the current post and check if the parent of each category matches one that is available in the array we created at step one. If we find one than we add it to the array of children.&lt;/li&gt;
&lt;li&gt;Joining everything is the second to last step that we need to do.&lt;/li&gt;
&lt;li&gt;Finally we can output our result.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And that&amp;#39;s it. Simple, right? I hope you enjoyed this short, simple tutorial.&lt;/p&gt;
&lt;p&gt;Let me know if you found another solution in the comments.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>useful</category><category>solution</category><category>wordpress</category><category>code</category><category>tutorials</category><category>bugs</category></item><item><title>Developers and social media. Is it a good thing?</title><link>https://stefancosma.xyz/2013/11/13/developers-and-social-media-is-it-a-good-thing</link><guid isPermaLink="true">https://stefancosma.xyz/2013/11/13/developers-and-social-media-is-it-a-good-thing</guid><description>Lone wolves or night owls, that&apos;s how you usually describe your friendly neighborhood developer. He doesn&apos;t travel in packs and usually you&apos;ll find him sitting</description><pubDate>Wed, 13 Nov 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Lone wolves or night owls, that&amp;#39;s how you usually describe your friendly neighborhood developer. He doesn&amp;#39;t travel in packs and usually you&amp;#39;ll find him sitting at a desk tipping his fingers off on some piece of code that is either to stubborn to run or he has an idea he wants to get of his mind, because as you may know most developers are brilliant geniuses.&lt;/p&gt;
&lt;p&gt;But why are developers so afraid of the outside world? Well my guess, as somebody on the inside, is that we don&amp;#39;t actually like how this world works and we&amp;#39;re not on the same page with current generations.&lt;/p&gt;
&lt;p&gt;Ok, but at some point in our developer lives we need to interact with other people, either for some advice, or for some food. I mean what developer doesn&amp;#39;t like food? Right? No, just me? Well, eventually we end up using social media outlets to get information, because nowadays everybody is connected in one way or another.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Off topic:&lt;/strong&gt; I recommend a super funny comic by super awesome comic designer &lt;a href=&quot;http://www.stanleycolors.com/&quot;&gt;Pablo Stanley&lt;/a&gt; on the &lt;strong&gt;Pros and Cons of dating a Programmer&lt;/strong&gt;, that you can find &lt;a href=&quot;http://bit.ly/1i1VgTB&quot;&gt;here&lt;/a&gt;. I guess it&amp;#39;s a little bit related to the topic.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And so we find ourselves using a bunch of social media services just because we need help with something, we need more information on something or we have to develop something using a specific API from a social media service.&lt;/p&gt;
&lt;p&gt;Whatever maybe the case, we&amp;#39;re &amp;quot;forced&amp;quot; to use a social service. Ok, you might say, but it&amp;#39;s everyone&amp;#39;s choice if they join or not, and you would be absolutely right. But what if your boss comes into your office one day and says you need to join a social service in order to test a certain feature you embedded in your web application. What then? Do you risk losing you job because you ignored a task? No! You either postpone the task for an infinite amount of time, do the old switcheroo with a colleague or you just quit (You always wanted to be your own boss right?).&lt;/p&gt;
&lt;p&gt;Social media and developers should be like oil and water, you can add one to the other, but they will never mix into a homogeneous liquid.&lt;/p&gt;
&lt;p&gt;On one hand you, as a developer, you can get help, news and information about stuff you&amp;#39;re interested in and on the other hand you can get lost in all that stuff that is out there and you could lose your focus on things.&lt;/p&gt;
&lt;p&gt;There should be a fine balance between work and social media. Spending too much time away from your projects might have a bad impact on who you are as a developer.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not saying don&amp;#39;t socialize, I&amp;#39;m just saying, try to find some stability when you use the social mediums. I see a lot of developers these days that spend a whole lot of time using the social media outlets. Yes, you can make yourself know, but you also spend time away from your projects, maybe important projects, that are the result of great ideas.&lt;/p&gt;
&lt;p&gt;If you have one eye on Twitter and one eye on Sublime Text, your focus is automatically split in half, and your productivity drops considerably. From my point of view (Wait, what was I reading until now?), having a social media presence has its benefits but you should always remember that there should be a balance between being a focused, productive developer and being a well know developer. Not all well-known developers are good developers.&lt;/p&gt;
&lt;p&gt;I guess that&amp;#39;s it for this article, a little shorter than usual but hey, it&amp;#39;s the second one in just two days. Let me know what are your thoughts about this topic in the comments.&lt;/p&gt;
&lt;p&gt;Are you a fan of the social media?&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>thoughts</category><category>questions</category><category>funny</category><category>developers</category><category>social-media</category><category>comics</category><category>article</category></item><item><title>A developer&apos;s tools of the trade.</title><link>https://stefancosma.xyz/2013/11/12/a-developers-tools-of-the-trade</link><guid isPermaLink="true">https://stefancosma.xyz/2013/11/12/a-developers-tools-of-the-trade</guid><description>You, me and your weird cousin that thinks he can make websites out of macaroni, well we&apos;re developers (At least some of us are!).  We rely on some sort of servi</description><pubDate>Tue, 12 Nov 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;You, me and your weird cousin that thinks he can make websites out of macaroni, well we&amp;#39;re developers (At least some of us are!).&lt;/p&gt;
&lt;p&gt;We rely on some sort of service or tool to get our work done, right? Right! Sometimes the tools we use are super complicated IDEs or maybe their just plain old simple Notepad.&lt;/p&gt;
&lt;p&gt;Whatever maybe the case, we&amp;#39;re as good as the tools that we use. If a tool is well-built, it performs as it should, it helps boost your productivity, and is constantly improved then I say it&amp;#39;s definitely a tool worth keeping.&lt;/p&gt;
&lt;p&gt;Along my years as a developer I&amp;#39;ve used a lot of tools to get my work done, and my guess is that so have you. There is an interesting &lt;a href=&quot;https://coderbits.com/posts/XUsCcQ&quot;&gt;discussion&lt;/a&gt; over on Coderbits about what people used over the years.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve found that the best tools are often the most simple ones, in terms of UI. Having a simple UI, helps us, the developers. We don&amp;#39;t need no fancy smancy (Is that even a word?) UI to get our work done. The simpler the better.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve started, as many of you might have, with good old Notepad. It was a good enough &amp;quot;tool&amp;quot;, and it still is (If you live in a cave and don&amp;#39;t have access to the Internet!).&lt;/p&gt;
&lt;p&gt;Notepad is like a training sword. You can hit stuff with it, but it won&amp;#39;t conquer a citadel (Well maybe it will, if your MacGyver!). It&amp;#39;s just a text editor, some may argue it&amp;#39;s the text editor, but one thing is for certain, it helped many of us become who we are today.&lt;/p&gt;
&lt;p&gt;After Notepad, I skipped a few steps and put on my big boy pants and started using Dreamweaver (The old Macromedia one!). At the time, it was amazing, I did everything with it. Stuff like design and development were done with just a few clicks. Want a button? Bo0om! Just insert one and there it is. My whole design process was done in Dreamweaver, and I&amp;#39;m not afraid of admitting it.&lt;/p&gt;
&lt;p&gt;Soon after the Dreamweaver stage was over I had a weird phase when I used a tool called Net Object Fusion. It was one of my worst decisions. If you want to build a horrible tool, that people will hate, look no further. Net Object Fusion is one of those tools that after you install it, you immediately regret your decision, crawl under your desk and start banging your head to the floor. But don&amp;#39;t take my word for it, check it out for yourself.&lt;/p&gt;
&lt;p&gt;We now head back to the Dreamweaver faze, but this time its made by Adobe (Aaa, good pal Adobe!). Yes, it was a simpler time back then. I started using Photoshop to design and forgot all about the time I used to design using Dreamweaver. I think Dreamweaver was never meant as a design tool, but nevertheless it did its job as both a design and development tool.&lt;/p&gt;
&lt;p&gt;Then somebody pushed the fast forward button and I had a weird fast phase. A quest phase if you will. The search for the perfect tool so I can do my work in peace. Notepad++, Aptana Studio, Eclipse, Blue Fish Editor were just a few of the tools I&amp;#39;ve used over the years as a developer.&lt;/p&gt;
&lt;p&gt;From all of them, Eclipse was my favorite. I developed the HTML Encrypter app with it. You can see it&amp;#39;s meant for Java development and nothing else. I tried using it for PHP development but something&amp;#39;s not right with it. I was never a big fan of NetBeans so I was faithful to Eclipse when it came to Java development.&lt;/p&gt;
&lt;p&gt;Blue Fish was my first editor when I added Ubuntu into my workflow. It performed well enough but not quite what I wanted.&lt;/p&gt;
&lt;p&gt;Enter Sublime Text, stage left. At first I was overwhelmed by the sheer power and the amount of stuff  it could perform. I don&amp;#39;t want to make this article a fan boy story about how cool Sublime Text is. It is! You should definitely give it a shot.&lt;/p&gt;
&lt;p&gt;I guess I&amp;#39;ve covered all of them. Have I? Yes I have. As I was saying at the beginning of this article, we as developers are as good as the tools we have available. You can&amp;#39;t conquer a tower with snowballs (Stop it with the analogies! I&amp;#39;m trying to make a point here.). The idea is that if you want to get your work done right, use the right tools and make your workflow as smooth as possible.&lt;/p&gt;
&lt;p&gt;What other tools have you used over the years, lets continue this discussion in the comments.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>tools</category><category>developers</category><category>ide</category><category>sublime-text</category><category>workflow</category><category>article</category></item><item><title>Let me CMS your stuff!</title><link>https://stefancosma.xyz/2013/10/17/let-me-cms-your-stuff</link><guid isPermaLink="true">https://stefancosma.xyz/2013/10/17/let-me-cms-your-stuff</guid><description>Let&apos;s begin from the premise that you as a well established developer, know what a CMS is, so I won&apos;t lecture you on what one is because I&apos;m sure you know a few</description><pubDate>Thu, 17 Oct 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Let&amp;#39;s begin from the premise that you as a well established developer, know what a CMS is, so I won&amp;#39;t lecture you on what one is because I&amp;#39;m sure you know a few, love one or loathe another, that&amp;#39;s why I&amp;#39;ll get straight to the point.&lt;/p&gt;
&lt;p&gt;In all my years as a developer I&amp;#39;ve had my way around a few CMS&amp;#39;s (Haven&amp;#39;t we all?), hell I even tried building one myself (Disclaimer: It&amp;#39;s still in development!), but some time ago I started asking myself what makes a good CMS? I know, I have weird hobbies, others think about pudding or world ... stuff (You thought I was going to say peace! Well think again!) and I fantasize about what makes a good CMS.&lt;/p&gt;
&lt;p&gt;Alright then, what makes a good CMS? Can anyone answer that? Maybe you can, or maybe you in the back with &amp;quot;My Little Pony&amp;quot; shirt? In my own personal opinion, a good CMS has to fulfill a few basic needs (5 to be more exact) in order for the end-user and the developer, that is in charge of the whole developing process, to be satisfied and happy.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Good UI.&lt;/strong&gt;&lt;br&gt;I&amp;#39;m referring here to the back-end UI and because this is a debatable point, I&amp;#39;m going to start with this one. We as developers don&amp;#39;t care that much about UI, so it doesn&amp;#39;t matter how it looks or how the whole writing / adding media process is performed as long as it just works, but for the end-user it&amp;#39;s really important. The truth, weather you like it or not, is that the UI has to be minimalist, clean, make use of icons, but it shouldn&amp;#39;t have just icons, it has to have text associated to each one of them and last but not least it has to be straight forward, no hidden menus, pages or ways to get a certain result. Using icons helps people remember stuff because our brain is wired in such a way that it&amp;#39;s easier for us to associate a picture to an action, and then use that information to perform that particular action.&lt;br&gt;Another important aspect is that is has to use warm colors, that don&amp;#39;t put too much strain on the users eyes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customizable.&lt;/strong&gt;&lt;br&gt;If the CMS gives people the ability to customize the way their content or website looks they will love it long time. People like when they have some sort of power over the whole creative process, even if they don&amp;#39;t know a thing about design. But some of you (Especially the designers!) won&amp;#39;t agree with me on this one, because giving a user too much power over how the whole thing looks might break all the hard work that was put into it. Well for those of you who question my opinion I have a simple word for you, &amp;quot;Markdown&amp;quot; (Enough said!),_ _and a very interesting point made my &lt;a href=&quot;http://twitter.com/rachelandrew&quot;&gt;Rachel Andrew&lt;/a&gt; at last years Smashing Conf, that you can visualize &lt;a href=&quot;https://vimeo.com/channels/smashingconf/54834476&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fast.&lt;/strong&gt;&lt;br&gt;The speed factor is a rather important aspect. I&amp;#39;m not referring only to the way the whole thing loads, I&amp;#39;m also referring to the speed of a process or a user action. How much time does it take to perform a basic action? Just because the CMS developer uses Google Fiber and all of the websites they browse load at the speed of the Millennium Falcon doesn&amp;#39;t mean they have to build a slow CMS. The end users will appreciate the fact that they won&amp;#39;t have to reload a page each time they want to &amp;quot;Save&amp;quot; something. Some may say that this aspect may be outdated, because nowadays everything is powered by node, angular, ember or whatever you prefer. Well that&amp;#39;s because people started to realize the use of building a dynamic, scalable application, that interacts with the server in real-time and provides information in the blink of an eye, to the end-user.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Developer Friendly.&lt;/strong&gt;&lt;br&gt;Developers are friendly people! Well at least most of them are, but that&amp;#39;s not the point here, the point is that when someone is building a CMS they should think about the developers and the torments they could go through if the CMS isn&amp;#39;t developer friendly enough. The CMS should have a good, well structured documentation that covers all the functions, classes and variables that are part of it. Developers shouldn&amp;#39;t wrap their heads around the documentation when they want to achieve something. The code should be well commented, because we, the other developers, tend to spend a very long period of time looking at other people&amp;#39;s code, and maybe if it were well commented then we would be able to solve a simple request from the client. Plugins. Developers love plugins! They love using them and they love making them. A CMS without plugins or extensions is like a phone without a pair of earbuds. It&amp;#39;s ok, you can listen to music using the built-in speaker, but that doesn&amp;#39;t mean you should.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sociable.&lt;/strong&gt;&lt;br&gt;We are a sociable species. Starting from the earliest stages of mankind and ending today, in the era of the smart things, we as humans always had a tendency to group and share stuff. We have created a network and systems that are present on that network that connect almost the entire human population. Having said that, giving the ability, to an individual, to share something with others, has a major impact on the way they perceive the before mentioned individual. A good CMS shouldn&amp;#39;t be only for managing content, it should also give a user the ability to share that content, if he or she so desires. Weather it integrates all the major social networks or just a basic comments system, people should be allowed to share their opinions, knowledge and in the end be able to share the content.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I guess I should wrap this up. In the end it&amp;#39;s all about the power that a user has over his content. What abilities is the CMS developer going to provide the user.&lt;/p&gt;
&lt;p&gt;Maybe the CMS will be restrictive and won&amp;#39;t allow many action to be performed over the content, but we&amp;#39;re getting into a whole different field, that I&amp;#39;m not going to elaborate now.&lt;/p&gt;
&lt;p&gt;The important thing to remember is that, no matter what CMS you chose to manage your content you should be able to manage it with ease and have the ability to share it with others.&lt;/p&gt;
&lt;p&gt;That is all for now. Let us continue this talk in the comments. What is your opinion on this?&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>tools</category><category>cms</category><category>wordpress</category><category>developers</category><category>content</category><category>article</category></item><item><title>Developers, stop hiding!</title><link>https://stefancosma.xyz/2013/10/07/developers-stop-hiding</link><guid isPermaLink="true">https://stefancosma.xyz/2013/10/07/developers-stop-hiding</guid><description>Let&apos;s start this \&quot;rant\&quot; with a slight deviation from the main topic, but don&apos;t worry about it we&apos;ll get back to it, by quoting someone much wiser and more exper</description><pubDate>Mon, 07 Oct 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Let&amp;#39;s start this &amp;quot;rant&amp;quot; with a slight deviation from the main topic, but don&amp;#39;t worry about it we&amp;#39;ll get back to it, by quoting someone much wiser and more experienced than me, &lt;a href=&quot;http://www.hanselman.com/about/&quot;&gt;Scott Hanselman&lt;/a&gt;, who said something like this, in his article &lt;a href=&quot;http://www.hanselman.com/blog/TheMythOfTheRockstarProgrammer.aspx&quot;&gt;The Myth of the Rockstar Programmer&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Just because someone has written a blog, or a book, or speaks well doesn&amp;#39;t mean they are a good developer.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Scott, raises an interesting point in the above statement, but is this statement true?&lt;/p&gt;
&lt;p&gt;Having theoretical knowledge in a field definitely doesn&amp;#39;t make you an expert in that particular field. In my opinion, a mixture of theory, theoretical practice and lot of time spent in the line of duty (Haha, I said duty!) can make an individual extremely good at something, in my case and I hope yours also, programming or web development or web design, it really doesn&amp;#39;t matter what you call the field you practice your activity.&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t get me wrong, knowing only theoretical facts isn&amp;#39;t such a bad thing and I don&amp;#39;t blame the ones that know the inwards and outwards of a programming book, that covers only theory, but not having practical experience doesn&amp;#39;t make you a good, let&amp;#39;s say for the sake of the argument, developer. And thus we end up once again at this aspect of every day life.&lt;/p&gt;
&lt;p&gt;You need experience for somebody to hire you, but nobody will hire you in the first place, so that you can get experience. See where I&amp;#39;m going with this? Damn you, &lt;a href=&quot;https://en.wikipedia.org/wiki/Circular_reasoning&quot;&gt;circular reasoning&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;But I won&amp;#39;t get into more details on this matter, in this article, maybe in a different one. Often, and I personally know a few cases, good, experienced developers are overshadowed by other &amp;quot;developers&amp;quot; that are full of theoretical facts but lack the practical knowledge to solve a problem, maybe even a simple one (eg. 1 + 1 = pie, the dessert not the mathematical constant!).&lt;/p&gt;
&lt;p&gt;Why are those developers, overshadowed? Well a simple answer would be that, the evil goblins from the evil firey pits of Isengard, the marketing department, have their minds blackened by the worm-tongue of a &amp;quot;theoretical&amp;quot; developer. The later one blows a lot of hot air and &amp;quot;he huffs und he puffs&amp;quot;, stating the an apparently simple problem can only be fixed using a complicated solution, because that&amp;#39;s how the books he learned from, stated.&lt;/p&gt;
&lt;p&gt;Well let me tell you something, last time I checked those books are meant to show you a hard solution, but that doesn&amp;#39;t mean you have to apply it to a real life scenario. And thus the good, experienced developer is overshadowed by someone who lacks practical knowledge or field knowledge. Ok, but why hide, when you can clearly avoid the awkward situation and also save a lot of time and money for the company?&lt;/p&gt;
&lt;p&gt;My thoughts are that, as all developers, most of us are introverts and only like to talk when there&amp;#39;s something interesting to talk about and that&amp;#39;s where the &amp;quot;theoretical&amp;quot; developer, that has a blog, is a good a speaker comes in and steals all the &amp;quot;glory&amp;quot;.&lt;/p&gt;
&lt;p&gt;So, I say to you, developers, please for the love of all that is holly in this cat-video filled world, &lt;strong&gt;STOP HIDING&lt;/strong&gt;! If you continue to hide, others, that are far more inexperienced than you, will come along and create this environment where everything is based on theoretical solutions and not on practical solutions, that are easy to implement and inexpensive. You know your abilities, you know you&amp;#39;re good and you know how to solve a complicated problem, even if it takes you a few days to come up with an answer. If you come out of hiding, I promise you, you&amp;#39;ll be considered a somewhat of a hero among your fellow developer friends (If you had any of course!). So once again, repeat after me:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I am a good developer, I like ... developing. I will come out of hiding as soon as I finish this parallax website and if I don&amp;#39;t may the firey pits of clients from hell consume my soul to eternal damnation!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Before I end this &amp;quot;rant&amp;quot; I would like to leave you with this thought and with hope that I convinced you to come out of hiding. Whether you&amp;#39;re a &amp;quot;theoretical&amp;quot; developer of a practical one, just remember one thing, that we&amp;#39;re all here to make the world of the web a better place, for everyone, to improve current technologies and your legacy to future generations will help define us as a predominant species in the universe, except maybe for the Borgs, that are just pure evil.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>article</category><category>developers</category><category>awesome</category><category>rant</category><category>theory</category></item><item><title>Koding Apps. Build one!</title><link>https://stefancosma.xyz/2013/10/04/koding-apps-build-one</link><guid isPermaLink="true">https://stefancosma.xyz/2013/10/04/koding-apps-build-one</guid><description>Disclaimer: All quoted paragraphs are reproduced in their entire form from the awesome Koding University that you can findhere [http://learn.koding.com].  Becau</description><pubDate>Fri, 04 Oct 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;Disclaimer: All quoted paragraphs are reproduced in their entire form from the awesome Koding University that you can find &lt;a href=&quot;http://learn.koding.com&quot;&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Because you&amp;#39;re an awesome reader, that already follows my awesomely written articles, you already know what Koding is, so I will not explain it again ... ok, ok, I&amp;#39;ll tell you, just stop showing me pictures of naked rat moles. What exactly is Koding? Well it can be summarized in the following short sentence.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Koding is an online development environment with the goal of simplifying worldwide development and providing free computation and development to everyone.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ok, let&amp;#39;s get back to our sheep.(What?!) Now that I&amp;#39;ve captured you&amp;#39;re attention and you know about Koding, what in the hell is a Koding app and why am I shoving it down your news feed?&lt;/p&gt;
&lt;p&gt;When the good people (&lt;a href=&quot;http://koding.com/devrim&quot;&gt;Devrim&lt;/a&gt; and &lt;a href=&quot;http://koding.com/sinan&quot;&gt;Sinan&lt;/a&gt;) over at Koding invented ... Koding, they also came up with an awesome idea of having some sort of &lt;em&gt;&amp;quot;desktop applications&amp;quot;&lt;/em&gt; made by the community. But wait, Koding apps are more than what I just said a few seconds ago, they&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;are basically clientside Apps that use the Koding Framework to communicate with your VM. This means that potentially any web-based and modular html/js/css app can be turned into a Koding App with some love! You can see this in the Koding Text editor. It&amp;#39;s basically just the Ace Editor wrapped in the Koding Framework.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So you can basically have a simple app that loads Google (If it allowed being loaded in an iFrame!) and even a complicated one that makes diagrams or even one that can edit photos.&lt;/p&gt;
&lt;p&gt;But what happens if an app you want to use isn&amp;#39;t featured in the app catalog? (Yes, I forgot to mention, Koding has an ever-growing app catalog, that features all the apps made by the community.) You build it yourself (Or commission someone to build one for you because you have the brains but not the coding know-how!), of course, because you&amp;#39;re a developer that likes to challenge himself/herself and you&amp;#39;re one that can overcome any task, regardless the fact that it&amp;#39;s like hacking NASA with a toaster.&lt;/p&gt;
&lt;p&gt;First thing to remember when trying to build a Koding app is that the apps are usually coded using CoffeeScript, so if you&amp;#39;re not that fluent in CoffeScript, I suggest you take a quick crash course before you start app building.&lt;/p&gt;
&lt;p&gt;Another important thing to remember is that there are apps that help you build an app (app-ception!). &lt;a href=&quot;https://koding.com/Apps/kodepad&quot;&gt;Kodepad&lt;/a&gt; and &lt;a href=&quot;https://koding.com/Apps/appmaker&quot;&gt;Appmaker&lt;/a&gt; are there to help you in your endeavor to achieve Koding app building awesomeness.&lt;/p&gt;
&lt;p&gt;Use them, they were built by awesome people and they should be recognized for this achievement. Ok, all that talk and still no code example of an app. Hold your &amp;quot;lederhosen&amp;quot;, it&amp;#39;s coming!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    class HelloApp extends KDView
        viewAppended:-&amp;gt;
            super

            {nickname} = KD.whoami().profile

            button = new KDButtonView
                title      : &amp;quot;Hello&amp;quot;
                callback   : -&amp;gt;
                    new KDNotificationView
                        title : &amp;quot;Hello #{nickname}!&amp;quot;
            @addSubView button

        do -&amp;gt;
            appInstance = new HelloApp
            appView.addSubView appInstance
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Boom! There you go! Simple as that. This short app generates a simple &amp;quot;Hello&amp;quot; button, that on callback shows a notification with your username, because you can get that info in an app.&lt;/p&gt;
&lt;p&gt;Go ahead, try it and let me know in the comments if it worked. You saw an example but now after I have convinced you with my awesome convincing skills you want to start building and app of your own, what about some Docs? Well ... docs ... are in making.&lt;/p&gt;
&lt;p&gt;Because it&amp;#39;s a big framework it takes some time before their done and in a good, developer friendly way. In the meantime you can use the apps I mentioned to get some reference or download source code from others apps and start experimenting with that.&lt;/p&gt;
&lt;p&gt;After you finish building your awesome app, that has a tone of features and can shoot unicorn dust out of its objects, you can submit it to the apps catalog, in order for all the world to see and lough at it (Joking! Or am I?). You can achieve that by following this great &lt;a href=&quot;http://learn.koding.com/guides/creating-kdapps/&quot;&gt;tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you built an app, let me know in the comments, I would love to take it for a spin. But why should you build one? The shortest answer would be, because it&amp;#39;s easy and you&amp;#39;re also helping a community of hard-working developers that wants to make the world an easier place for other developers!&lt;/p&gt;
&lt;p&gt;The long answer would be something like this: because developing one would help you learn (And who doesn&amp;#39;t love learning new stuff? &lt;em&gt;awkward silence&lt;/em&gt;) a new framework that is fresh, well-built, has a lot of potential (Koding has 400k+ users in case you were wondering, so it&amp;#39;s a pretty big deal).&lt;/p&gt;
&lt;p&gt;You, as a developer, would get a lot of recognition from all your developer friends (We all know you don&amp;#39;t have any but it&amp;#39;s nice to fantasize from time to time!) for your awesome coding skills and last but not least, you would contribute to the development of tomorrows technologies that will help future generations.&lt;/p&gt;
&lt;p&gt;Did I mention it&amp;#39;s also open source? Yes, you publish all your code to Github. Who knows maybe in 10/20 years everyone will code only in the cloud and hard disk drives will be a thing of the past, a thing that you&amp;#39;ll frame and sell to a pawn shop. If I haven&amp;#39;t convinced you yet, then you have some serious convincing issues to address. I guess that&amp;#39;s all for now. When the Koding app Docs are finished I&amp;#39;ll write some more adventure articles on how to build an app from start to finish, but until that happens, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>koding-apps</category><category>open-source</category><category>free</category><category>koding</category><category>tutorials</category><category>coffescript</category><category>build</category></item><item><title>Terminal, do you speak it?</title><link>https://stefancosma.xyz/2013/09/29/terminal-do-you-speak-it</link><guid isPermaLink="true">https://stefancosma.xyz/2013/09/29/terminal-do-you-speak-it</guid><description>&gt; \&quot;What OS you from?\&quot; \&quot;What?\&quot; \&quot;&apos;What&apos; aint no OS I ever heard of! They speak Terminal in &apos;what&apos;?\&quot; \&quot;What?\&quot; \&quot;Terminal, motherfucker, do you speak it?\&quot;   Well mayb</description><pubDate>Sun, 29 Sep 2013 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;&amp;quot;What OS you from?&amp;quot; &amp;quot;What?&amp;quot; &amp;quot;&amp;#39;What&amp;#39; aint no OS I ever heard of! They speak Terminal in &amp;#39;what&amp;#39;?&amp;quot; &amp;quot;What?&amp;quot; &amp;quot;Terminal, motherfucker, do you speak it?&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Well maybe you don&amp;#39;t, what happens then? Good question, let&amp;#39;s ask the almighty Wiki. Maybe it can answer what a Terminal is? Almighty Wiki, what say ye about Terminal! &lt;em&gt;Deep aussie accent:&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A Termi... what now? Ohh, a Terminal! Well a terminal emulator provides an environment for Unix shells, which allows the user to interact with the operating system of any Unix-like computer in a text-based manner through the command line interface to the operating system!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ok, thanks! You heard the thing. Now back to the point in hand. Along my years as a developer, I have never ever met a more useful tool than the above mentioned Terminal. You can do almost anything with a Terminal. We&amp;#39;re referring here to the web related stuff, because can do other stuff also, stuff like playing games, seeing a doctor, watching a movie (hint: telnet) or letting the Terminal talk back to you (If you&amp;#39;re into that sort of thing, weirdo!). You can write code and save it, connect remotely to a database and modify it to your hearts desire or you can go as far as never leave the Terminal and build an entire website using it.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Disclaimer: This is not a crash course in Terminal, if you need one of those you can search Wiki&amp;#39;s long-lost cousin Google.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;But there is more to this than just fun and games. From my own experience with a Terminal, whether it&amp;#39;s a Linux one, a Mac OS one, or even a cloud based one, like the one Koding has, I have found a few commands that every web developer should use or could use to make his/hers life easier. Maybe the most useful command I found is the following one:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;grep -r &amp;quot;word&amp;quot; *
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Using this command you can search for a word in any file located in the current folder and it&amp;#39;s children. So if you&amp;#39;re in the root folder, this command will search every nook and cranny for that word, until it finds it. If, for example you&amp;#39;re to lazy or you don&amp;#39;t have enough time (Because you&amp;#39;re to lazy!) to move files around and you have a big project with lots of files, then the following command is here to help. This will move all files from sub-folders to their correspondent parent folder.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mv *.* ..
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ok, these were commands useful on a day-to-day basis, but what if you have your own server and root access to it (hint: Koding offers those for free!). What can you do then? Well there&amp;#39;s a simple answer to that question. Let&amp;#39;s start from the premise that you have an Apache server. A good, useful command would be the following, for when things get a little out of hand:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo service apache2 restart
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Because any respectable command starts with a &lt;strong&gt;sudo&lt;/strong&gt;, so does this one. Basically this is the equivalent to the restart button on your old Windows machine, that your grandma&amp;#39; still uses. But what caused the error, that needed you to force choke your machine? This command may come in handy:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo tail -n 50 /var/log/apache2/error.log
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It displays, in an orderly fashion, what happened to your precious. Having seen what you did wrong to your precious server, you&amp;#39;re now heading to the root of all things evil. Your ex&amp;#39;s heart? Haha, nice try, but we all know she doesn&amp;#39;t have a heart. No, I meant the Apache config file (the source of all that is evil in the world), the one that you can edit using this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo nano /etc/apache2/sites-enabled/default
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Pretty straight forward, if I do say so myself. If that didn&amp;#39;t do the trick then you can always check with the Sisters of Fate over at:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo tail -n 50 /var/log/syslog
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and see what went wrong there. And finally to check if your precious is still alive you can use the pulse checking utility:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ping -n 5 www.example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I guess that ends our list of useful commands that you could use in a Terminal. But why is a Terminal useful? Well, my opinion is that maybe it gives us more control over the stuff we do. It lets us access the core of our system. It&amp;#39;s kind of a gateway to our computer/server&amp;#39;s mind, in more laymen terms.&lt;/p&gt;
&lt;p&gt;Now don&amp;#39;t expect to learn Terminal in a day, but if you do start learning about what it can do and what are the benefits of using one, then remember one thing: With great power comes ... aaa ... penguins? Yeah, penguins are the answer to everything, even a terminal.&lt;/p&gt;
&lt;p&gt;I guess that&amp;#39;s it. If you have suggestions or you thing I missed something let me know in the comments below and I&amp;#39;ll add them to the list.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>useful</category><category>commands</category><category>terminal</category><category>knowledge</category><category>article</category></item><item><title>Open Source. The story? The facts?</title><link>https://stefancosma.xyz/2013/09/27/open-source-the-story-the-facts</link><guid isPermaLink="true">https://stefancosma.xyz/2013/09/27/open-source-the-story-the-facts</guid><description>A long time ago in a galaxy far, far away … ups, wrong tale!  Our story begins in the same place where all computer related stuff happen! China? No, somewhere b</description><pubDate>Fri, 27 Sep 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A long time ago in a galaxy far, far away … ups, wrong tale!&lt;/p&gt;
&lt;p&gt;Our story begins in the same place where all computer related stuff happen! China? No, somewhere between Palo Alto, CA , the great wizards castle of Bell Labs and IBM’s scary dungeon-forest headquarters, in a time when music was a state of mind and Internet was just a concept in a book.&lt;/p&gt;
&lt;p&gt;Because every story evolves around people, this one starts with a particular group of people, more specifically the guys in the SHARE user group (It was one of the first groups that embraced the open source movement.), used to exchange software.&lt;/p&gt;
&lt;p&gt;The software that used to be shared included IBM&amp;#39;s source releases of its operating systems, witch was a big deal at the time! Why, you may ask? Well because sharing it, was in the end, a basic necessity. At that particular point in time there were no separate portable executable binaries (or .cpl, .exe, .dll, .ocx, .sys, .scr, .drv filename extensions, for all you mere mortals) to distribute software and distributing software as the source code was the only practical solution.&lt;/p&gt;
&lt;p&gt;Skipping a few years ahead we reach a point in time when the Internet became a reality. Software was shared via networks like Usenet, IRC or Gopher. Around these networks, word spread like wildfire and people said that Linux became some kind of a knight in shinning armor for the open source community.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Spoiler alert: in the end Linux became the undisputed king of open sourceness.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We skip some more and we finally reach the year of our lord 1998. This was a good year for open source (Somehow it feels like wine is being brewed.). It all started with the release of the source code for the Navigator browser and continued with different summits and gatherings of sorts, and in the end the term “open source” got stuck and people started using it all around the developer communities.&lt;/p&gt;
&lt;p&gt;Ok, I think that&amp;#39;s enough history for one article so I&amp;#39;ll try to get to the point.&lt;/p&gt;
&lt;p&gt;There are, nowadays, two widely used terms to describe open source software: free open source software and commercial open source software. You as a tech-fearing developer probably have used one or the other in your projects or in your day-to-day use, because nothing says good software as being able to tinker with the code. Well that’s not always the case, but we’ll face that dragon another time and dimension.&lt;/p&gt;
&lt;p&gt;Knowing that anyone can use one of the two let’s take a closer look (Not that close!) at what the average developer started using all around the web. Open source has become in recent years more than a way to share software, for free, with the community, it become a state of mind, a way of life, that developers all around the world embrace with ease. But what’s so good about open source that people start using it more and more?&lt;/p&gt;
&lt;p&gt;Well for starters you get to share your work with other people (How cool is that!), and maybe you have some unresolved issues with your work, that&amp;#39;s where the community members come in and maybe some of them see the issues you tried to overcome, in a different perspective and thus provide a different solution to your issues.&lt;/p&gt;
&lt;p&gt;But, you know, multiple heads are always better than just a single one (Brace yourself, mythological analogy coming up!), just like a hydra can damage your armor (and in the end remove from the face of the earth!) more easily using it’s multiple heads.&lt;/p&gt;
&lt;p&gt;It’s all about people collaborating and helping each other in times of need! But that&amp;#39;s not all you get if you embrace the open source you can also get great feedback from the people who you shared your work with, as well and get more in-depth suggestions on how to improve things. Ok, so we established on thing, that we all can agree on: open source has a lot of benefits if you know how to “benefit” from them.&lt;/p&gt;
&lt;p&gt;But let&amp;#39;s not get ahead of ourselves, you simple, yet promising, young padawan! The evil wizard &lt;em&gt;insert evil company name here&lt;/em&gt; has other plans for this open sourceness that everybody is talking about. How about they only open source half of the software or as the commoners would say, open source line by line. What? Can he do that? Yes, he can and he will (We’re still talking about the wizard!)!&lt;/p&gt;
&lt;p&gt;But that’s not fair! Well companies these days, see fairness in a whole different light. They believe that if they release bits of code and keep others with a chastity belt around and locked up in a tower of the fanciest castle at the top of the tallest mountain, they’ll protected themselves from the evil dragon (best known for it’s common name, the common Internet troll, that does nothing but criticize the work of other not contributing to any of it in any way.) that eats code for breakfast. This practice is best known as “we’ll give only the stuff we want”ism and as you may have already seen the developers are not really big fans of this practice, because they don’t have access to the important stuff that really matters and that could really be improved.&lt;/p&gt;
&lt;p&gt;Ok, so how do we wrap this up?&lt;/p&gt;
&lt;p&gt;It doesn&amp;#39;t matter what term you use to describe your open source project, whether commercial of free, you need to understand some basic things about open sourceness before people start engaging in your project.&lt;/p&gt;
&lt;p&gt;First of all don’t abuse it (The open sourceness, of course!), because if you do it’ll come back around and bite that shiny new armor you just bought and you wear around your head.&lt;/p&gt;
&lt;p&gt;The second most important thing to remember is to try to embrace the open source movement at an early stage in the development process. Stuff like, thoroughly commenting your code or organizing your files in an orderly fashion will make your software more friendly to a future developer that wants to help or one that tries to improve the stuff you did.&lt;/p&gt;
&lt;p&gt;This mentality of “I’ll keep it to myself” is outdated and you as a developer or multinational company should not embrace it and you should root against this practice.&lt;/p&gt;
&lt;p&gt;Why should I do this? Because nowadays the world runs on the following phrase: Sharing is caring. If you don’t open source stuff and don’t embrace collaborative software development you’ll get nowhere and you’ll end up somewhere on a deserted island in the middle of the ocean with nothing but a stick and a rock, to survive.&lt;/p&gt;
&lt;p&gt;Until next time, stay open source and code long and prosper! Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>open-source</category><category>developers</category><category>story</category><category>history</category><category>article</category></item><item><title>How To: Remove Custom Post Type URL slugs</title><link>https://stefancosma.xyz/2013/09/26/how-to-remove-custom-post-type-url-slugs</link><guid isPermaLink="true">https://stefancosma.xyz/2013/09/26/how-to-remove-custom-post-type-url-slugs</guid><description>Disclaimer: This is a version I found useful and it worked for my particular case. It may not work for you, but you can post a comment bellow and maybe we can f</description><pubDate>Thu, 26 Sep 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;Disclaimer: This is a version I found useful and it worked for my particular case. It may not work for you, but you can post a comment bellow and maybe we can figure it out.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Interesting issue. If you&amp;#39;re a &lt;strong&gt;WordPress&lt;/strong&gt; developer than you might have come across this issue in your endeavors to become an ultimate WordPress ninja.&lt;/p&gt;
&lt;p&gt;I came across this while working on a recent project for an in-house project at the agency I work.&lt;/p&gt;
&lt;p&gt;Having a custom post type and wanting the slug removed from the URL is tricky and is case depended. I tried a lot of plugins and solutions until I came across one (Sadly I can&amp;#39;t find the original link, but if you do find it, please let me know in the comments below.) that I later tweaked for my own personal use (The version you are about to read is my version!), because, as I said this issue is case depended.&lt;/p&gt;
&lt;p&gt;So, let us get down to the nitty-gritty. All you need are the following lines of code, that should be placed in your theme&amp;#39;s &lt;strong&gt;functions.php&lt;/strong&gt; file, and your permalink structure should be &lt;strong&gt;/%postname%/&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;_&lt;strong&gt;Advice:&lt;/strong&gt; Before placing these functions in your file you need to replace each occurrence of &lt;strong&gt;CUSTOM_POST_TYPE_NAME&lt;/strong&gt; and, depending on your case, replace this line _&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$post_name = $query-&amp;gt;get(&amp;#39;name&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;with this one&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$post_name = $query-&amp;gt;get(&amp;#39;pagename&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;_and you should be good to go. _&lt;/p&gt;
&lt;p&gt;If you want a more detailed explanation on how this works, keep reading the rest of the article after the following code section.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                add_filter(&amp;#39;post_type_link&amp;#39;,&amp;#39;custom_post_type_link&amp;#39;, 10, 3); 
    function custom_post_type_link($permalink, $post, $leavename) { 

        $url_components = parse_url($permalink); 
        $post_path = $url_components[&amp;#39;path&amp;#39;]; 
        $post_name = end(explode(&amp;#39;/&amp;#39;, trim($post_path, &amp;#39;/&amp;#39;))); 

        if(!empty($post_name)) { 
            switch($post-&amp;gt;post_type) { 
                case &amp;#39;CUSTOM_POST_TYPE_NAME&amp;#39;: 
                    $permalink = str_replace($post_path, &amp;#39;/&amp;#39; . $post_name . &amp;#39;/&amp;#39;, $permalink); 
                break; 
            } 
        } 
        return $permalink; 
    } 

    function custom_pre_get_posts($query) { 
        global $wpdb; 

        if(!$query-&amp;gt;is_main_query()) { 
            return; 
        } 

        $post_name = $query-&amp;gt;get(&amp;#39;name&amp;#39;); 
        $post_type = $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( &amp;#39;SELECT post_type FROM &amp;#39; . $wpdb-&amp;gt;posts . &amp;#39; WHERE post_name = %s LIMIT 1&amp;#39;, $post_name ) ); 

        switch($post_type) { 
            case &amp;#39;CUSTOM_POST_TYPE_NAME&amp;#39;: 
                $query-&amp;gt;set(&amp;#39;CUSTOM_POST_TYPE_NAME&amp;#39;, $post_name); 
                $query-&amp;gt;set(&amp;#39;post_type&amp;#39;, $post_type); 
                $query-&amp;gt;is_single = true; 
                $query-&amp;gt;is_page = false; 
            break; 
        } 

        return $query; 
     } 
     add_action(&amp;#39;pre_get_posts&amp;#39;,&amp;#39;custom_pre_get_posts&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ok, you got to code, you placed it in your functions.php file but you want to understand the ways of the force.&lt;/p&gt;
&lt;p&gt;Ok, let&amp;#39;s dissect this sucker. The first thing that we have to do is to remove the actual slug from the actual URL. We can do this by getting the &lt;strong&gt;permalink&lt;/strong&gt; for the current post and dissecting it using &lt;strong&gt;parse_url&lt;/strong&gt; function (Very useful function!).&lt;br&gt;In the end (See what I did there?) we get the post name from the URL. Now we check the post type and if the current post has the desired type we proceed in removing the slug using &lt;strong&gt;str_replace&lt;/strong&gt; on the permalink.&lt;/p&gt;
&lt;p&gt;In order for this function to work we need it to be attach to a hook. Luckly, good guy WordPress has a filter called &lt;strong&gt;post_type_link&lt;/strong&gt; that is used&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;prior to printing by the function get_post_permalink.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ok, you managed to get until this step but you get a 404, right? Right. Well that&amp;#39;s because WordPress doesn&amp;#39;t recognize that post as a custom post type anymore. But we can fix that and trick WordPress into thinking that the requested post is in fact a custom post type.&lt;/p&gt;
&lt;p&gt;The last function does this very thing. We need the &lt;strong&gt;global $wpdb&lt;/strong&gt; variable, because we&amp;#39;re going to play with the DB a bit (Don&amp;#39;t worry we won&amp;#39;t break anything important!). After checking if we&amp;#39;re on the main query we proceed in getting the name for the current post.&lt;/p&gt;
&lt;p&gt;The next logical step is to get the post type for the requested post. We do this with a simple &lt;strong&gt;SQL select&lt;/strong&gt;. And now for the fun part. If the post type is our desired post type than we do the following actions. We set the value for the custom post type, the requested post. The basic syntax for query set is this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$query-&amp;gt;set(&amp;#39;key&amp;#39;, &amp;#39;value&amp;#39;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;WordPress needs to know what type the requested post is. After that we need to specify that the post is indeed a custom post type. And now for some little developer fairy dust and magic. We remind dear old WordPress that our post is in fact a post and it should be treated like one, that&amp;#39;s where &lt;strong&gt;is_single&lt;/strong&gt; comes in and &lt;strong&gt;is_page&lt;/strong&gt; walks away. In order for this little trick to work, WordPress has a nifty little action called &lt;strong&gt;pre_get_posts&lt;/strong&gt; that is&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;called after the query variable object is created, but before the actual query is run.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You can change all the stuff you want using this hook, before &amp;quot;all the gates open&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Useful resources:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://wordpress.org/plugins/debug-bar/&quot;&gt;Debug Bar&lt;/a&gt; with &lt;strong&gt;WP_DEBUG&lt;/strong&gt; and &lt;strong&gt;SAVEQUERIES&lt;/strong&gt; set to true in &lt;strong&gt;wp_config.php&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And that was our lesson in WordPress slug removing (Nasty little buggers!).&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>wordpress</category><category>resources</category><category>developers</category><category>tutorials</category><category>how-to</category><category>functions</category></item><item><title>SmartWeb | Conference Adventures - Episode 1</title><link>https://stefancosma.xyz/2013/09/25/smartweb-conference-adventures-episode-1</link><guid isPermaLink="true">https://stefancosma.xyz/2013/09/25/smartweb-conference-adventures-episode-1</guid><description>Disclaimer: This article is the start to a whole series about conference going. You can read about what usually happens when I go somewhere and there&apos;s a confer</description><pubDate>Wed, 25 Sep 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;Disclaimer: This article is the start to a whole series about conference going. You can read about what usually happens when I go somewhere and there&amp;#39;s a conference involved.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Maybe you Internet types don&amp;#39;t like &lt;strong&gt;Episode I&lt;/strong&gt; (You know what saga I&amp;#39;m referring too!) but I&amp;#39;ll start with the first episode, not the 4th, like some people.&lt;/p&gt;
&lt;p&gt;If I am in your following list on &lt;a href=&quot;http://twitter.com/stefanbc&quot;&gt;Twitter&lt;/a&gt; (If I&amp;#39;m not, then I definitely did something wrong with my social skills!) you may recall something about me going to a conference a few days ago (I should mention this is &lt;strong&gt;NOT&lt;/strong&gt; my first conference!).&lt;/p&gt;
&lt;p&gt;Well, I attended the &lt;a href=&quot;http://smartwebconf.com&quot;&gt;SmartWebConf&lt;/a&gt; in Bucharest (weird city!) and let&amp;#39;s start from the premise that is was &lt;strong&gt;awesome&lt;/strong&gt; (And believe me it was super awesome. &lt;em&gt;&lt;strong&gt;no irony intended&lt;/strong&gt;&lt;/em&gt;), but I&amp;#39;ll get to that in just a bit.&lt;/p&gt;
&lt;p&gt;It all started in the year of our lord 2013 on the third day of the month of harvest at &lt;a href=&quot;https://twitter.com/Designmodo/status/374808425885990913&quot;&gt;11:17am&lt;/a&gt;. I was casually removing some slugs from a &lt;strong&gt;WordPress&lt;/strong&gt; custom post type when, a good friend of mine, (Yes, &lt;a href=&quot;http://twitter.com/jcsrb&quot;&gt;him&lt;/a&gt;!) sends me the now famous, mentioned tweet.&lt;/p&gt;
&lt;p&gt;At first I was reluctant in replying to the said mentioned tweet, but I said to myself (Well actually my inner Morgan Freeman voice said.) what the hell and did it anyway. The reply was, let&amp;#39;s say, &lt;a href=&quot;https://twitter.com/stefanbc/status/374836844900253696&quot;&gt;a cheesy one&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I finished my &lt;strong&gt;slug removing&lt;/strong&gt; and didn&amp;#39;t bother looking for the aftermath of my reply. Some time passed and my inbox was flooded with e-mails about my &lt;a href=&quot;https://twitter.com/Designmodo/status/374922791037833217&quot;&gt;achievement&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;All was well and the day before the conference came. In Romania, when you need to get somewhere and you don&amp;#39;t have a car you need to rely on the mercy of private companies to get you around (Trains do exist, but for some reason they&amp;#39;re not as often as you might think and not at a reasonable, late in the night, hour). That being said, I put my faith in humanity once again and booked a ticket for a bus with a private company.&lt;/p&gt;
&lt;p&gt;So far so good. But wait, there&amp;#39;s more! It was a late bus (The middle of the night, late!), my alarm didn&amp;#39;t go off and you can figure out what happened next. I wake up right after the bus leaves. What to do, what to do? No seriously, what should I do? Book another ticket, right? Easier said then done. The next bus wasn&amp;#39;t leaving for next 4 hours, but I booked it anyway. Get to the bus station. Check! Get the bus ticket. Check! Realize that the ticket is in fact the receipt for the ticket because that&amp;#39;s how that company works. Check! Getting on the new bus. Check! Alright, the bus leaves.&lt;/p&gt;
&lt;p&gt;So far so good, sounds familiar right? The bus makes about half the distance to Bucharest and guess what, it breaks down (Smoke coming out of the back and technical stuff like that!). The bus driver struggles to get the bus to about 75% of the way to Bucharest until it finally breaks down (The bus, not the driver, but maybe the driver also broke down.).&lt;/p&gt;
&lt;p&gt;Getting on another bus. Check! I get to Bucharest and immediately find the nearest tube station. The distance from where I get off the tube to the conference place is about 20 min of walking, but I didn&amp;#39;t knew that at that particular moment and I get a cab, and what do you know, the cab driver asks for more money then what the counter was saying.&lt;/p&gt;
&lt;p&gt;I finally get to my destination with a 2 hour delay, just in time for the first coffee break (Good thing I don&amp;#39;t drink coffee!) and miss the first two talks (Sorry &lt;a href=&quot;http://twitter.com/carlsmith&quot;&gt;@carlsmith&lt;/a&gt; and &lt;a href=&quot;http://twitter.com/stopsatgreen&quot;&gt;@stopsatgreen&lt;/a&gt;!).&lt;/p&gt;
&lt;p&gt;But all was good, I check in and find myself a chair. And now the awesome begins (It was just &lt;strong&gt;puppies and unicorns&lt;/strong&gt; until now!). I tip my imaginary hat (If I had one of those!) to the organizers. It was a &lt;strong&gt;well-organized event&lt;/strong&gt; and the overall look and feel was impressive.&lt;/p&gt;
&lt;p&gt;The speakers, that included &lt;a href=&quot;http://twitter.com/snookca&quot;&gt;@snookca&lt;/a&gt;, the one and only &lt;a href=&quot;http://twitter.com/smashingmag&quot;&gt;@smashingmag&lt;/a&gt;, &lt;a href=&quot;http://twitter.com/brucel&quot;&gt;@brucel&lt;/a&gt; and a few others that are just as awesome (&lt;a href=&quot;http://twitter.com/sickdesigner&quot;&gt;@sickdesigner&lt;/a&gt; was the only Romanian speaker, but that didn&amp;#39;t stop him!), were top-notch.&lt;/p&gt;
&lt;p&gt;The amount of information was &amp;quot;over 9000&amp;quot; and the atmosphere they created was just as it should have been, &lt;strong&gt;immersive&lt;/strong&gt;, fun and a bit technical (but not too much, I wanted a bit more). I found out about a lot I didn&amp;#39;t know from Vitaly (That I&amp;#39;d like to thank for bringing &lt;a href=&quot;http://instagram.com/p/er3MFZRMzf/&quot;&gt;Cody&lt;/a&gt; to me, all the way from Germany.), I laughed with Bruce and learned about usability testing from &lt;a href=&quot;http://twitter.com/danrubin&quot;&gt;Dan&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After everyone said their goodbyes and the organizers thanked everyone and invited us for a well deserved beer, each of the attendees made use of the remaining time, doing what they enjoy the most (Drinking beer, of course! Myself included.).&lt;/p&gt;
&lt;p&gt;Had a blast at &lt;a href=&quot;http://smartwebconf.com&quot;&gt;SmartWebConf&lt;/a&gt; with everyone (Thanks to &lt;a href=&quot;http://twitter.com/jcsrb&quot;&gt;Jakob&lt;/a&gt; and &lt;a href=&quot;http://twitter.com/cri_5u&quot;&gt;Cristina&lt;/a&gt; for an awesome planned out evening!).&lt;/p&gt;
&lt;p&gt;And I should wrap this up. Leaving the joking aside, my overall experience was good (With the minor incidents I experienced!) and I totally recommend, if you have the time and resources necessary, to &lt;strong&gt;attend a conference&lt;/strong&gt;. You&amp;#39;ll learn a lot, meet a lot of fun, smart people who will make you do stuff that you wouldn&amp;#39;t try doing on your own and by yourself.&lt;/p&gt;
&lt;p&gt;In our line of work it&amp;#39;s good to socialize, so that we can eliminate that thought we all have in our back of our heads. Penguins? No. Not being accepted in the line of duty and being labeled as an anti-social person (We all know a few people like this.) by your fellow developer/designer colleagues.&lt;/p&gt;
&lt;p&gt;That is all, until the next conference adventure, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>attending</category><category>conference</category><category>developers</category><category>fun-stuff</category><category>adventures</category><category>episodes</category><category>travelling</category></item><item><title>Design the community and then the tool!</title><link>https://stefancosma.xyz/2013/09/21/design-the-community-and-then-the-tool</link><guid isPermaLink="true">https://stefancosma.xyz/2013/09/21/design-the-community-and-then-the-tool</guid><description>What are you talking about? How can I create a community if I don’t have a tool to start with? Maybe if you keep reading you’ll understand.  For now, the only t</description><pubDate>Sat, 21 Sep 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;What are you talking about? How can I &lt;strong&gt;create a community&lt;/strong&gt; if I don’t have a tool to start with? Maybe if you keep reading you’ll understand.&lt;/p&gt;
&lt;p&gt;For now, the only thing you really need to know is that you need a 60 feet long rope, some duct tape and that it takes a lot of time, effort and practice to get it done, but you’ll eventually get the hang of it. Let me start you off with a little bit of history to better understand this concept, that people adopted in the early days of software development.&lt;/p&gt;
&lt;p&gt;Back in the days of Windows 95 and when JavaScript was first deployed, when people were still afraid of the Y2K, you as a computer-fearing user, were usually forced to install pieces of software on your slow, but still unbelievably reliable, computer. Those were times when things like the first PlayStation came out, and yes there was a first PlayStation for all you “Call of Battlefield” nerds, the USB became a standard and Netscape was the captain ruling the web.&lt;/p&gt;
&lt;p&gt;Installing a program in those days meant you had to spend time actually reading the user manual and, bear with me on this one, reading the full Terms and Conditions and accepting it.&lt;/p&gt;
&lt;p&gt;You were supposed to go to school and learn how to use the computer, not find tutorials on the Internet and use those (ok, maybe you could have done this, but that’s not the point here!). It took many years to master the computer and those particular softwares that you needed.&lt;/p&gt;
&lt;p&gt;This going to school process and learning the stuff you needed to know to operate something meant that you socialized within a physical domain. You had to interact with other people, to share your knowledge and knowledge be shared with you.&lt;br&gt;Along these periods of time of interaction with other people, communities were being build. If one particular community was a computer related one then you can be sure that different tools emerged that were built inside that community, by that community, for the entire community.&lt;/p&gt;
&lt;p&gt;But not all communities were built this way! No? No, communities were also emerging around tools that were used on a day to day basis. Let’s say, Netscape for example. It had a really supporting community that loved the browser and developed websites using it.&lt;/p&gt;
&lt;p&gt;But what made, that community work? And more important why was Netscape such a loved browser and why don’t penguins fly? Because they’re too heavy! No! The community worked because it was “designed” from the start as one and then given the tools to work with. As somebody once said: “Don’t design tools, they are useless. Design a community and give it the tools”. And he’s right! Without a community built around the tool, your tool is useless.&lt;/p&gt;
&lt;p&gt;Nowadays, in the era of iStuff and droids on other planets, we take tools for granted, not caring about features and other jibber jabber like a community would. A community is the soul of every tool because it actually gives a rats ass about the features and bugs that you, as an individual, don’t actually care about.&lt;/p&gt;
&lt;p&gt;You, as a IE fearing individual, may be tempted to say stuff like: “Oh, I already have a photo album app and I also can send videos in an email, why would I need Facebook or Google+ (ok maybe not Google+!)” because Facebook for example isn’t all about photos and videos alone, it’s about sharing them in a community that you built - your friends.&lt;/p&gt;
&lt;p&gt;People these days should try and integrate themselves in a community because once they achieve this they’ll see that tools are made for them with their help. Software making companies need not hide themselves behind big corporate walls, because if they do this communities will crumble and nobody is ever going to like their product, ever!&lt;/p&gt;
&lt;p&gt;If you’re a software company don’t just build a tool and hand it over to the users. You need feedback from them and you need a community that supports your efforts in making your tool bug free and full of useful features.&lt;/p&gt;
&lt;p&gt;I see more and more companies these days that don’t take into consideration the social aspect of their tools. Why am I saying this? Well because more and more stuff will be, in the near future, made available in a social setting. Users are no longer having school, home or college as a primary social environment because the Internet took over this position. Users want to know everything right in the heat of the moment, well because they can. They want to share stuff with the world and know what the world shares with them.&lt;/p&gt;
&lt;p&gt;So if the app or tool you’re making hasn&amp;#39;t got a social feature for your users then I suggest you think twice before you release it. Nobody will like it and nobody will use it because having social integration means that you can help your users create a community and be social.&lt;/p&gt;
&lt;p&gt;I should wrap this up and I will. In the past, the developer focused on the tool and it’s features. He didn&amp;#39;t actually care about the community because he had more important stuff to do, like protecting himself from Y2K (&lt;em&gt;sigh&lt;/em&gt;) and to implement features that he thought were useful. Now, if you can’t share the stuff you make with the tools you are using or the output of those tools, you can’t get feedback from the people, from the community. Having an awesome tool, that can’t output stuff that you can share with the community, isn&amp;#39;t enough to get the job done.&lt;/p&gt;
&lt;p&gt;One last thing to remember: Imagine a community, design for people, make the best tools and give it to them, or you will fail.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>community</category><category>article</category></item><item><title>Coderbits API Hacking</title><link>https://stefancosma.xyz/2013/09/21/coderbits-api-hacking</link><guid isPermaLink="true">https://stefancosma.xyz/2013/09/21/coderbits-api-hacking</guid><description>Well hello there, dear reader, this the first article from a series of tutorial articles that will be featured around here. Let&apos;s get started then.  If  you rea</description><pubDate>Sat, 21 Sep 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Well hello there, dear reader, this the first article from a series of tutorial articles that will be featured around here. Let&amp;#39;s get started then.&lt;/p&gt;
&lt;p&gt;If  you read the title but still haven&amp;#39;t figured out what the hell I&amp;#39;m talking about, I&amp;#39;ll try to shed some light.&lt;br&gt;What is &lt;strong&gt;Coderbits&lt;/strong&gt;? Coderbits is, as the official description says:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Intelligent portfolios for developers and designers&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Basically you sign up (Super simple stuff until this point!) and build your profile using data gathered from all your profiles you own, whether it&amp;#39;s &lt;strong&gt;Github&lt;/strong&gt;, &lt;strong&gt;Dribbble&lt;/strong&gt; or even the ones with the weird name, like &lt;strong&gt;Work for Pie&lt;/strong&gt; (that is shutting down, if you haven&amp;#39;t heard). The community is great (If you build a great tool, great people will come!) and a lot of &lt;strong&gt;awesome resources&lt;/strong&gt; are shared everyday by the community members.&lt;/p&gt;
&lt;p&gt;But enough about the awesome community, let&amp;#39;s get down to the nitty-gritty (Do we have to? Yes, yes we do!), the API. The &lt;strong&gt;Coderbits profile API&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;provides a simple JSON endpoint for every profile. It is accessed by issuing an HTTPS GET request to the profile URL with .json added to the end.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You can read more about how the API works by heading over to the official &lt;a href=&quot;https://coderbits.com/api&quot;&gt;page&lt;/a&gt; and then the Profile API section. So how do we tackle the issue of using the Coderbits API with PHP?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Disclaimer: For the sake of this tutorial I will keep things as simple and as short as possible. If you have issues with this tutorial please report them in the comments bellow or at &lt;a href=&quot;mailto:hello@stefancosma.eu&quot;&gt;hello[at]stefancosma[dot]eu&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Well it&amp;#39;s fairly simple (Aren&amp;#39;t all things?!). We have some simple and basic functions that can be used to get information from the API and then display the information that we want in a page.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The first function is the one that gathers the info from the Coderbits API.&lt;/p&gt;
&lt;p&gt;// Get the JSON file from coderbits&lt;br&gt;function coderbits_profiler_get_json($username) {&lt;br&gt;// jSON URL which should be requested&lt;br&gt;$json_url = &amp;#39;&lt;a href=&quot;https://coderbits.com/&quot;&gt;https://coderbits.com/&lt;/a&gt;&amp;#39; . $username . &amp;#39;.json&amp;#39;;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   // Initializing curl
   $ch = curl_init($json_url);

   // Configuring curl options
   $options = array(
       CURLOPT_RETURNTRANSFER =&amp;gt; true,
       CURLOPT_HTTPHEADER =&amp;gt; array(&amp;#39;Content-type: application/json&amp;#39;)
   );

   // Setting curl options
   curl_setopt_array($ch, $options);

 // Getting results
 $result = curl_exec($ch); // Getting jSON result string

 // Save the result into a local file
 $save_file = file_put_contents(dirname(__FILE__) . &amp;#39;/cache/&amp;#39; . md5($username), $result);

 // Close request to clear up some resources
 curl_close($ch);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This function gathers all the data from the API call, for the specified user, using cURL, and saves it in a cache folder with the name of the file being the username encrypted with md5.&lt;/p&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;&lt;p&gt;The second function is the most important one of the ones that we are going to use. This function will output the data from the saved file.&lt;/p&gt;
&lt;p&gt;// Get data from JSON file&lt;br&gt;function coderbits_profiler_data($type, $subtype = &amp;#39; &amp;#39;, $username) {&lt;br&gt;// The filename path&lt;br&gt;$file = dirname(&lt;strong&gt;FILE&lt;/strong&gt;) . &amp;#39;/cache/&amp;#39; . md5($username);&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   // Check if the file exists
   if (file_exists($file)) {
       // Read the local file for data
       $json_file = file_get_contents($file);

       // Parse the JSON result from the file
       $output = json_decode($json_file, true);

       // Output the requested field
       $return = $output[$type];

       // Check if the field is array
       if (is_array($return)) {
           // If the type is badge do other stuff
           if ($type == &amp;#39;badges&amp;#39;) {
               // Badge limit counter
               $badge_limit_counter = 0;

               // Get all the items in the array
               foreach ($return as $items) {
                   // Each item has multiple arrays
                   foreach($items as $key =&amp;gt; $badge) {
                       // Convert key =&amp;gt; value arrays into variables
                       $$key = $badge;
                   }
                   // Check if the badge has been earned
                   if ($earned &amp;amp;&amp;amp; !empty($earned_date)) {
                       // Build the badge
                       $data .= &amp;quot;&amp;lt; a title=&amp;quot;&amp;#39; . $name . &amp;#39; - &amp;#39; . $description . &amp;#39;&amp;quot; href=&amp;quot;&amp;#39; . $link . &amp;#39;&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;&amp;lt; img alt=&amp;quot;badge&amp;quot; src=&amp;quot;&amp;#39; . $image_link . &amp;#39;&amp;quot; width=&amp;quot;45px&amp;quot; height=&amp;quot;45px&amp;quot; /&amp;gt;&amp;quot;;
                       // Break the loop if we reach 15 entries
                       if (++$badge_limit_counter == 15) break;
                    }
                }
                // Get the badges count
                badges_count = coderbits_profiler_data(&amp;#39;one_bit_badges&amp;#39;) + coderbits_profiler_data(&amp;#39;eight_bit_badges&amp;#39;) + coderbits_profiler_data(&amp;#39;sixteen_bit_badges&amp;#39;) + coderbits_profiler_data(&amp;#39;thirty_two_bit_badges&amp;#39;) + coderbits_profiler_data(&amp;#39;sixty_four_bit_badges&amp;#39;);
                // Output it
                $data .= &amp;#39;&amp;lt; a href=&amp;quot;https://coderbits.com/&amp;#39; . get_option(&amp;#39;coderbits_profiler_username&amp;#39;) . &amp;#39;/badges&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;view all &amp;#39; . $badges_count . &amp;#39;&amp;#39;;

            } elseif ($type == &amp;#39;accounts&amp;#39;) {
                // Get all the items in the array
                foreach ($return as $items) {
                    // Each item has multiple arrays
                    foreach($items as $key =&amp;gt; $account) {
                        // Convert key =&amp;gt; value arrays into variables
                        $$key = $account;
                    }
                    $account_image = &amp;#39;http://coderbits.com/images/&amp;#39; . str_replace(&amp;quot; &amp;quot;,&amp;quot;&amp;quot;,strtolower($name)) . &amp;#39;32.png&amp;#39;;
                    $data .= &amp;#39;&amp;lt; a title=&amp;quot;&amp;#39; . $name . &amp;#39;&amp;quot; href=&amp;quot;&amp;#39; . $link . &amp;#39;&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;&amp;lt; img alt=&amp;quot;account&amp;quot; src=&amp;quot;&amp;#39; . $account_image . &amp;#39;&amp;quot; name=&amp;quot;&amp;quot; /&amp;gt;&amp;#39;;
                 }
             } else {
                 // Get all the items in the array
                 foreach ($return as $items) {
                     // Each item has multiple arrays
                     foreach($items as $key =&amp;gt; $item){
                         // Check if the key from the loop is the chosen type
                         if ($key == $subtype) {
                             $data .= $item;
                             // Add comma after each element except the last one
                             if (next($items)) $data .= &amp;#39;, &amp;#39;;
                         }
                      }
                  }
              }
       } else {
           // If it&amp;#39;s a normal field return it
           $data = $return;
       }
   } else {
       // If the file can&amp;#39;t be read fill each value with NULL
       $data = &amp;quot;NULL&amp;quot;;
   }

   return $data;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In order to use this function you will need to provide the type of the field you want to output, if the field has a sub-array you have to provided that (it&amp;#39;s an optional parameter) and last but not least the username. Those are all the functions we need. To actually use these functions, you need to call** just once** the first function like in the example below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;coderbits_profiler_get_json(&amp;#39;bit&amp;#39;); //Because who doesn&amp;#39;t love Bit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and after that you can echo each field like in the following example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;echo coderbits_profiler_data(&amp;#39;top_area&amp;#39;,&amp;#39;name&amp;#39;,&amp;#39;bit&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And now you know how to use the Coderbits API using PHP. Super simple stuff, just like Bit&amp;#39;s name!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Useful advice&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Call the first function just once, so not to burden your bandwith (it&amp;#39;s a lot of data when you make an API call).&lt;/li&gt;
&lt;li&gt;Try improving the functions and let me know in the comments bellow.&lt;/li&gt;
&lt;li&gt;Read the comments I provided for each line of code.&lt;/li&gt;
&lt;li&gt;Experiment!&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>coderbits</category><category>plugin</category><category>wordpress</category><category>curl</category><category>php</category><category>api</category><category>hacking</category><category>tutorials</category></item><item><title>What if your users are developers?</title><link>https://stefancosma.xyz/2013/09/21/what-if-your-users-are-developers</link><guid isPermaLink="true">https://stefancosma.xyz/2013/09/21/what-if-your-users-are-developers</guid><description>Art they, or aren&apos;t they, that is the question: Whether &apos;tis Developer in the mind to suffer. That’s how Shakespeare would have written his words if the Interne</description><pubDate>Sat, 21 Sep 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Art they, or aren&amp;#39;t they, that is the question: Whether &amp;#39;tis Developer in the mind to suffer. That’s how Shakespeare would have written his words if the Internet existed at the time and developers would have been considered a noble part of society!&lt;/p&gt;
&lt;p&gt;Nowadays, when the Internet is full of cat videos and bears jumping on trampolines, we can safely say that a developer is, to some degree, like a modern Shakespeare. He writes plays in the form of code, and some of them are good (the plays, of course), some of them aren&amp;#39;t but that doesn&amp;#39;t stop him from writing and creating great plays.&lt;/p&gt;
&lt;p&gt;If you’re reading this, you might consider yourself as being a developer? Right? Ok, I’m glad we cleared that up! Your skills make stuff work and some of the apps you make are used by other people. Aaa, the magic word! Peanuts? No, people!&lt;/p&gt;
&lt;p&gt;Without people your tools or apps are pretty much useless. Why you may ask? Well because for starters people are the core of the community that gets built around your app.&lt;/p&gt;
&lt;p&gt;It might not be a finished product, it may be still in alpha stage of development, but it’s been written with great care by you, it’s your baby and you take care of it, you nurture it, just like a beaver takes care of its dam. Ok, but still, you’re a great developer and you made a great app that can breathe fire through it’s input fields and people don’t appreciate it. Well maybe because it’s been written under the pressure of time and building something under the pressure of time isn&amp;#39;t a great idea. I mean look at the pyramids, they got build over a very long period of time (20 goddamn years!), and I’m not saying that you should do the same but no need to hurry. Or maybe the technology isn&amp;#39;t advanced enough for your awesome ideas. Who knows? You certainly don’t.&lt;/p&gt;
&lt;p&gt;Let’s start from the premise that you’re honest about your work and your work reflects your skills as a developer. You accept the fact that your app has flaws, you know them, you acknowledge them and your users understand this to some basic level. They’re mere mortals, they can’t understand the powers involved in creating an awesome app like yours!&lt;/p&gt;
&lt;p&gt;But what if your users were developers as well? What happens then? It ain&amp;#39;t going to be pretty, I’m telling you! Developers as users are like bulls in a single china shop! It’s a curse and a blessing at the same time. Why?&lt;/p&gt;
&lt;p&gt;Well because they might know how you build the app or tool, they will test the hell out of it and they will break every single “china in the shop”! But keep in mind that this way you’ll get rid of all the bad bugs (bugs = china, for anyone who asks) from the start even if that means you sacrifice a few good features!&lt;/p&gt;
&lt;p&gt;They will click on every nook and cranny, every possible corner, until they find an error and when they do, because believe me they will, they’ll send you a screenshot of their desktop, that&amp;#39;s full of apps and other gibberish, because they don’t know how to open MS Paint and crop the error out from their screenshot, and your Inbox will be flooded with screenshots of errors surrounded by lightsaber-wielding-kitties running around on flying walruses over a field of rainbows!&lt;/p&gt;
&lt;p&gt;They start to complain about stuff not working and not being able to do this or that, comparing your app with others on the market that might offer similar services.&lt;/p&gt;
&lt;p&gt;Nooo! That’s my baby, they can’t do that! Yes they can and they will, because developers, more specifically people, have a tendency to break stuff that doesn&amp;#39;t belong to them, because you know, they can’t have it entirely for themselves and they want to know how it works even if that means that they are going to break it into a million screenshots.&lt;/p&gt;
&lt;p&gt;As developers they should understand with ease that an app isn&amp;#39;t going to write itself and that it takes time to get it right from the first try. This principle applies to all apps and tools out there (I’m looking at you, Apple Maps!).&lt;/p&gt;
&lt;p&gt;I said it before, I’ll say it again, be honest about your work, accept all the flaws and don’t hide behind a made up title that you found on the Internet to cover your own issues and the issues you have with your app, because your developer users will transform from innocent users to an angry-app-eating-mob.&lt;/p&gt;
&lt;p&gt;But having developers as users has it’s good parts, right? Right! They can provide valuable feedback about stuff you might have missed during your long debugging sessions in the dead of night. They also might help you in the process of rebuilding those “china&amp;#39;s” that they broke earlier in the process. Because having multiple minds focused on a single subject can have a tremendous impact on the final outcome of the finished product. And we all want users that are happy about the app that they use.&lt;/p&gt;
&lt;p&gt;Accept their suggestions or criticism (except those ones that cross the line, you can ban those bastards!). If you win a developer, you win everybody who listens to him. They will like you, they will like your product, and they will recommend you to anyone who asks.&lt;/p&gt;
&lt;p&gt;If you messed up something, say you did, apologize and your developer users will understand and carry on. Don’t apologize 3 days later saying something like “Sorry if that may have caused inconvenience!” (I’m looking again at you, Apple Maps!). There is no “may” in this situation because it did cause something, and it wasn&amp;#39;t very pretty. Your developer users aren&amp;#39;t going to like it, not one bit and you’ll soon be surrounded again by that same angry-app-eating-mob (we just got rid of them, dammit!).&lt;/p&gt;
&lt;p&gt;To end this article, because I know you got bored reading it and you want to return to your cat videos, I’ll leave you with this: having developers as users to your app or tool is difficult. They can be great users and provide useful feedback and suggest improvements but they can also be a big pain. If you can make this happen, it’s a wonderful thing and the web is going to get more awesome than you might think, if you can’t, it may hurt.&lt;/p&gt;
&lt;p&gt;Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>article</category><category>community</category><category>developers</category><category>users-tag</category></item><item><title>Hello world!</title><link>https://stefancosma.xyz/2013/09/20/hello-world</link><guid isPermaLink="true">https://stefancosma.xyz/2013/09/20/hello-world</guid><description>I bid you hello, dear reader, welcome to this website, that for some particular reason I [http://coderbits.com/stefanbc] own it.  What is the purpose of this we</description><pubDate>Fri, 20 Sep 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I bid you hello, dear reader, welcome to this website, that for some particular reason &lt;a href=&quot;http://coderbits.com/stefanbc&quot;&gt;I&lt;/a&gt; own it.&lt;/p&gt;
&lt;p&gt;What is the purpose of this website, you may ask? Well for starters this is a website that is maintained by me, Stefan. This is a place where I, Stefan, share knowledge and sometimes adventures, with you, the reader.&lt;/p&gt;
&lt;p&gt;I come here to write about topics that can vary from stuff like hacking NASA with a toaster and a paperclip to Quantum chromodynamics (look it up it&amp;#39;s an interesting topic).&lt;/p&gt;
&lt;p&gt;Why should you read the articles featured on this website, you ask? Well, as I said a few sentences back, this is where I share knowledge and sometimes adventures.&lt;/p&gt;
&lt;p&gt;Maybe you, as me and so many other these days share a common interest in stuff like code, design and other jibber jabber, except cat videos! If you need those you can go to YouTube! That is all for now. Until next time, code long and prosper!&lt;/p&gt;
&lt;p&gt;Cheers, Stefan.&lt;/p&gt;
</content:encoded><dc:creator>Stefan Cosma</dc:creator><category>hello-world</category></item></channel></rss>