Should I Learn Kotlin or Java?

Original Source: http://blog.teamtreehouse.com/learn-kotlin-java

With Android officially adopting Kotlin as a supported language, there’s one question that every new Android developer should be asking themselves: should I learn Kotlin or Java?

Rather than burying the answer all the way at the bottom… in my mind, it’s definitely Kotlin.

Kotlin was introduced in 2011 by JetBrains (maker of IntelliJ IDEA, PyCharm, and many other top IDEs) who at the time were using almost entirely Java. They created Kotlin because, “First and foremost, it’s about our own productivity”.

kotlin island*Kotlin is named after Kotlin Island in St. Petersburg, Russia

So Kotlin was created explicitly to be better than Java, but JetBrains wasn’t about to rewrite their IDEs from scratch in a new language. Which is why they made Kotlin 100% interoperable with Java. Kotlin runs on the JVM and compiles down to Java bytecode; you can start tinkering with Kotlin in an existing Java or Android project and everything will work just fine.

That said, there aren’t yet many Android tutorials using Kotlin; most beginner stuff is in Java along with the Android docs (though we’re working on our first beginner-focused Kotlin for Android course, and it should be out before too long). So to figure out how the Android system works and what it looks like behind the scenes, you’ll have to spend some time with Java.

Now let’s get back to that productivity part. There are plenty of articles out there showcasing what Kotlin can do, and there’s even a really good Java/Kotlin comparison on the Kotlin website (which has excellent documentation). So rather than creating an exhaustive list of what makes Kotlin so awesome, I’m going to show you my favorite example of Kotlin superiority which I borrow from our Kotlin for Java Developers course.

Creating a Card Class

Let’s say we need a class to represent the state of a playing card. It would need 3 properties: the value of the card, the suit of the card, and whether or not the card is face up. Also, since we usually deal cards face down the ‘faceUp’ property will typically be false, so we shouldn’t need to specify it every time.

Here’s what that looks like in Java. We need three fields as well as associated getters/setters, along with two constructors.

Here’s what it looks like in Kotlin:

class Card(val value: Int, val suit: String, var faceUp: Boolean = false)

33 lines down to 1! Not bad, right? But it gets better. In Java (and Kotlin), if you try to print out an object, instead of seeing the properties of the object you see the object reference:

And if you try to compare these two cards, you’ll end up comparing object references, and it’ll be false:

println(card1 == card2); // false
println(card1.equals(card2)); // false

In Java, if you want to test for equality between objects you need to override the ‘equals’ method:

And if you want to see something useful when you print the object, you need to override the ‘toString’ method:

But in Kotlin, all you have to do is add the word ‘data’ in front of your class:

data class Card(val value: Int, val suit: String, var faceUp: Boolean = false)

Here it is in action:

We’ve now got 51 lines of Java, and still just 1 line of Kotlin!

smilies

In summary, learn Kotlin. But if you’re completely new to programming, start with Java first. Most Android code is still written in Java, and at the least, understanding Java will be a boon for understanding the docs. Once you’ve got the basics of Java, you’ll be able to pick up Kotlin that much faster and will have a greater appreciation for the benefits that Kotlin brings. On the other hand, if you’re an experienced developer check out our Kotlin for Java Developers course. It teaches you everything you need to know about Kotlin by building a headless solitaire app!

Ps. If you’re looking for a list of reasons Kotlin is better than Java, Magnus Vinther does a great job of breaking it down in this medium post. 

The post Should I Learn Kotlin or Java? appeared first on Treehouse Blog.

Interview with Julie Anixter, Executive Director of AIGA

Original Source: http://justcreative.com/2017/07/17/interview-with-julie-anixter-executive-director-of-aiga/

Below is an interview with Julie Anixter, Executive Director of AIGA, on the topic of career development, which is the topic of the this year’s annual AIGA Design Conference in Minneapolis, Minnesota on October 12-14, 2017.

Also see the free Podcast / YouTube interview with Julie and Ram Castillo here.

Enjoy!

1. Why is career development so important to AIGA?

Careers in design are morphing constantly alongside an evolving industry, which presents a challenge for all designers, new and established. The AIGA community draws from a wealth of experience to help provide foresight on those changes and the other challenges that come with building a career – whether you are trying to find a path forward or grow in your current position.

2. Have you taken any unusual jobs that led to remarkable experiences?

Honestly, making the decision to lead the AIGA was a different path for me. It has introduced me to so many remarkable people and experiences. It’s privilege to serve designers and the design community – which represents unending inspiration and possibility. We want to make sure to harness our members’ and chapters’ extraordinary energy and share it across the US. I’m especially keen on sharing new design experiences at our upcoming Design Conference in October, where we’re focusing on the connecting power of design.

3. Best advice you’ve ever been given regarding your career/or the worst

Don’t waste time in the wrong job, regardless of the temptations that might drive you to accept one or stay longer than necessary. Find a place that provides a good fit for your talents and the opportunity to bring as much of your experience as possible.

4. What advice can you offer those just starting off in design?

When you’re starting off, the best thing you can do is immerse yourself in work from a wide variety of projects, disciplines and designers. A good way to do that is joining organizations or groups such as AIGA which allows you to take advantage of the association’s resources and the membership’s collective knowledge.

Amazing Things

5. What is the most important lesson you’ve learned in your career to date?

Courage is stronger than fear.

When you let fear be your main driver, you miss out on life experience, but when you live courageously new opportunities are always on the horizon.

6. How has mentorship made a difference in your professional or personal life?

My mentors travel with me in my head, heart and instincts. (See here for how to get a mentor guaranteed) They make me smile and show up like guides when the going gets rough. Chief among them: my father, Tom Peters, Seth Godin, Admiral Joseph Dyer and Gyongy Laky.

7. How does AIGA help designers looking to move along their desired path?

AIGA helps designers along their career paths through connection and community, first and foremost. It takes resources and the support of a strong network to become a successful designer, and AIGA members have a network of mentors built in. Our members go past just connecting to help each other find answers or jobs, and provide inspiration and stimulation at every point of the journey.

8. What do you want AIGA to accomplish in the next year/five years?

For more than 30 years, AIGA has served as an epicenter for our diverse community of professionals to meet, exchange ideas, and grow the design industry. Our community is our most valuable asset. The strength within our community is fueled by making sure that designers have the competencies to make an impact on business, industry, and society. Over the course of the next couple of years, we are really focusing on career journeys and the myriad of possibilities evolving out of design’s ever-changing landscape.

Do you have any further questions to ask Julie? Let us know below.

Desktop Wallpaper Calendars for July 2012

Original Source: http://feedproxy.google.com/~r/visualswirl/~3/k285KixL9do/

July desktop calendars are hot off the press. 2012 is halfway gone but these fun and inspiring calendar wallpapers will surely help you get through the dog-days of summer. These fine wallpapers have been hand-picked from talented artists and designers from around the web. Feel free to share your favorites and check back next month for some great new desktop calendars. As always, if you’d like to include your own design in future roundups, let me know.

5 Desktop Wallpaper Calendars for July
Wallpaper by Paper Leaf

Sandy backgrounds and a retro color scheme comprise this beautiful wallpaper. The script font matches nicely with this “made for the beach” design.

July 2012 Desktop Calendar

Wallpaper by Webgranth

Rainy days may be a title better served for the spring (depending on your location) but regardless, this illustrated desktop calendar provides some optimism for what is typically a scorchingly hot time of year.

Wallpaper by Studio of Mae

Studio of Mae  has another nice  patterned wallpaper ready for July. As always the fonts and minimal calendar go nicely with the lovely background. Enjoy!

Decorative July Desktop Wallpaper

Wallpaper by Kriegs

This darker, grunge based design has some nice inkblot/rorschach digital art working for it. Do you see anything in the ink blots?

July Desktop Wallpaper Calendar

Wallpaper by Cromoart

Abstract shapes bursting from an evening view of the shade tree on a farm. I absolutely love the color scheme. There’s also iPad and iPhone versions available.

Abstract July 2012 Desktop Calendar

That’s the roundup. Please let us know which calendar is your favorite by leaving a comment below.

The post Desktop Wallpaper Calendars for July 2012 appeared first on Visual Swirl Design Resources.

25 Examples of Super Wide Website Designs

Original Source: https://line25.com/articles/25-examples-of-super-wide-website-designs

As monitor resolutions become larger, websites tend to become wider. This showcase features 25 awesome website designs over 1000px in width.

Many of these super wide website designs are built as responsive layouts, which allows the designer to accommodate even the largest of screen sizes with the max-width property without chopping off elements on smaller resolutions.

Want more similar website designs for inspiration? Check out these Fullscreen WordPress Themes! 

Michela Chiucini

This is the portfolio of an Italian designer and art director. It makes use of the popular flat design trend and focuses on typography rather than images.

Michela Chiucini Wide Website Designs

Dave Gamache

Dave is a designer & builder based in San Francisco and this is his portfolio website that features a fullscreen layout and cool effects.

Dave Gamache Wide Website Designs

Miro Hristov

This is an exceptional portfolio website with an interactive layout that will definitely get your attention.

Miro Hristov Creative Portfolio Design

Michael Schmid

Michael Schmid is a German Digital Designer & Developer and this is his monochromatic, minimalist portfolio design. It has some nice transitions, so make sure you check it out.

Michael Schmid Wide Website Designs -

Studio Airport

This is the website for a creative design agency. It includes useful info about the services they provide, team members, a blog, contact, etc.

Studio Airport Graphic Designer Portfolio Website

Tommy

This is the presentation website of an independent digital agency. It has a fullscreen layout and bold, large typography to catch your attention.

This Is Tommy Wide Website Designs

HatBox

This website fills up your whole screen with info. It has a minimalist design and a simple layout.

Proven user experience design consulting

Carter Digital

This is the presentation website of a usability, service design & user experience agency that creates ideas and products that transform and grow businesses.

Carter Wide Website Designs

Lounge Lizard

This is a creative web design with a fixed menu design, beautiful fonts, full-screen layout, high-quality images, and more.

Lounge Lizard Portfolio Website

Andrew Revitt

Andrew Revitt is a freelance designer with 15 years experience working in web, graphic, branding, UI and UX design and this is his extremely straightforward, minimalist portfolio.

Andrew Revitt Wide Website Designs

Jeff Broderick

This creative wide website design includes a parallax effect, lovely fonts, a beautiful transparent header with a menu and more features.

Jeff Broderick Portfolio Website

Forefathers Group

Forefathers Group is a global design conglomerate that builds responsive branding systems, web design, and web development for brands and businesses. This is their website. It has a wide layout and some vintage-inspired graphic elements and fonts.

Forefathers Wide Website Designs

Adhemas Batista

This is a creative portfolio website with a full-screen layout which takes up the entire space of the browser.

Adhemas Batista Creative Portfolio Design

Information Architects

iA creates digital products and offers strategic design and consulting services through their UX studios. This is their simple but very effective website design.

Digital Product Studios Wide Website Designs

Smashing Magazine

Smashing Magazine is a website for web designers and developers. This is the layout they use for the posts section of the site.

Smashing Magazine Wide Website Designs

UPPERDOG

Upperdog is a solutions focused web design and digital marketing agency in Bournemouth, Dorset. They have a very wide website design with large graphic elements and images.

 Wide Website Designs

New Adventures in Web Design

This website covers the whole area of your browser with its extremely wide slider and content block.

 Wide Website

Meltmedia

Meltmedia designs and develops websites, web apps, and mobile apps with robust CMS platforms and web technologies. This is their colorful website with a wide layout and a blend of high-quality images.

meltmedia Wide Website Designs

Electric Pulp

Electric Pulp is a digital agency focusing on Responsive Web Design, Web Development and Mobile eCommerce. They put an accent on large fonts, with bold features and solid color blocks.

Electric Pulp

Jeremy Sallee

This is a great portfolio website with a simple, wide layout design. It uses a full-screen layout with a transparent header design.

Jeremy Sallee Website Design
CSS-Tricks

You all know this website. It offers tips, tricks, and techniques on using Cascading Style Sheets. They have a grid layout design that covers the whole browser area.

CSS Tricks Wide Website

Trent Walton

This is the portfolio of a designer and web builder. It has a white, clean background and a wide layout for the content area.

Trent Walton Wide Website

Tuts+

This is the website to find videos and online courses to help you learn skills like code, photography, web design and more. Their website layout is wide and contains grid sections as well.

How-To Tutorials & Online Courses Wide Website

Björn Meier

Check out this creative website design which makes use of large, bold fonts to catch the visitors’ attention. It has a fullscreen layout.

Bjorn Meier Graphic Designer Portfolio Website

Mariusz Cieśla – Web & Mobile Interface & Experience Designer

This is a creative portfolio website with  an interactive design and a unique, wide, animated background.

Mariusz Cieśla Web & Mobile Interface & Experience Designer

The post 25 Examples of Super Wide Website Designs appeared first on Line25.

The Critical Request

Original Source: https://css-tricks.com/the-critical-request/

Serving a website seems pretty simple: Send some HTML, the browser figures out what resources to load next. Then we wait patiently for the page to be ready.

Little may you know, a lot is going on under the hood.

Have you ever wondered how browser figures out which assets should be requested and in what order?

Today we’re going to take a look at how we can use resource priorities to improve the speed of delivery.

Resource priority at work

Most browsers parse HTML using a streaming parser—assets are discovered within the markup before it has been fully delivered. As assets are found, they’re added to a network queue along with a predetermined priority.

In Chrome today, there are a number of asset prioritization levels: Very Low, Low, Medium, High and Very high. Peeking into Chrome DevTools source shows that these are aliased to slightly different labels: Lowest, Low, Medium, High and Highest.

To see how your site is prioritizing requests, you can enable a priority column in the Chrome DevTools network request table.

If you’re using Safari Technology preview, the (new!) Priority column can be shown in exactly the same way.

Show the Priority column by right clicking any of the request table headings.

You’ll also find the priority for a given request in the Performance tab.

Resource timings and priorities are shown on hover

How does Chrome prioritize resources?

Each resource type (CSS, JavaScript, fonts, etc.) has their own set of rules that dictate how they’ll be prioritized. What follows is a non-exhaustive list of network priority plans:

HTML— Highest priority.

Styles—Highest priority. Stylesheets that are referenced using an @import directive will also be prioritized Highest, but they’ll be queued after blocking scripts.

Images are the only assets that can vary priority based on viewport heuristics. All images start with a priority of Low but will be upgraded to Medium priority when to be rendered within the visible viewport. Images outside the viewport (also known as “below the fold”) will remain at Low priority.

During the process of researching this article, I discovered (with the help of Paul Irish) that Chrome DevTools are currently misreporting images that have been upgraded to Medium as Low priority. Paul wrote up a bug report, which you can track here.

If you’re interested in reading the Chrome source that handles the image priority upgrade, start with UpdateAllImageResourcePriorities and ComputeResourcePriority.

Ajax/XHR/fetch()—High priority.

Scripts follow a complex loading prioritization scheme. (Jake Archibald wrote about this in detail during 2013. If you want to know the science behind it, I suggest you grab a cuppa and dive in). The TL;DR version is:

Scripts loaded using <script src=”name.js”></script> will be prioritized as High if they appear in the markup before an image.
Scripts loaded using <script src=”name.js”></script> will be prioritized as Medium if they’re appear in the markup after an image.
Scripts that use async or defer attributes will be prioritized as Low.
Scripts using type=”module” will be prioritized as Low.

Fonts are a bit of a strange beast; they’re hugely important resources (who else loves the “‘I see it!”, “Now it’s gone”, “Whoa, a new font!” game?), so it makes sense that fonts are downloaded at the Highest priority.

Unfortunately, most @font-face rules are found within an external stylesheet (loaded using something like: <link rel=”stylesheet” href=”file.css”>). This means that web fonts are usually delayed until after the stylesheet has downloaded.

Even if your CSS file references a @font-face font, it will not be requested until it is used on a selector and that selector matches an element on the page. If you’ve built a single page app that doesn’t render any text until it renders, you’re delaying the fonts even further.

What makes a request critical?

Most websites effectively ask the browser to load everything for the page to be fully rendered, there is no concrete concept of “above the fold”.

Back in the day, browsers wouldn’t make more than 6 simultaneous requests per domain — people hacked around this by using assets-1.domain.tld, assets-2.domain.tld hosts to increase the number of asynchronous downloads but failed to recognize that there would be a DNS hit and TCP connection for each new domain and asset.

While this approach had some merits, many of us didn’t understand the full impacts and certainly didn’t have good quality browser developer tools to confirm these experiments.

Thankfully today, we have great tools at our disposal. Using CNN as an example, let’s identify assets that are absolutely required for the viewport to be visually ready (also known as useful to a someone trying to read it).

The user critical content is the masthead, and leading article.

There’s really only 5 things that are necessary to display this screen (and not all of them need to be loaded before the site is usable):

Most importantly, the HTML. If all else fails the user can still read the page.
CSS
The logo (A PNG background-image placed by CSS. This could probably be an inline SVG).
4(!) web font weights.
The leading article image.

These assets (note the lack of JavaScript) are essential to the visuals that make up the main viewport of the page. These assets are the ones that should be loaded first.

Diving into the performance panel in Chrome shows us that around 50 requests are made before the fonts and leading image are requested.

CNN.com becomes fully rendered somewhere around the 9s mark. This was recorded using a 4G connection, with reasonably spotty connectivity.

There’s a clear mismatch between the requests that are required for viewing and the requests that are being made.

Controlling resource priorities

Now that we’ve defined what critical requests are, we can start to prioritize them using a few simple, powerful tweaks.

Preload (<link rel=”preload” href=”font.woff” />) instructs the browser to add font.woff to the browser’s download queue at a “High” priority.

Note: as=”font” is the reason why font.woff would be downloaded as High priority — It’s a font, so it follows the priority plan discussed earlier in the “How does Chrome prioritise resources?” section.

Essentially, you’re telling the browser: You might not know it yet, but we’re going to need this.

This is perfect for those critical requests that we identified earlier. Web fonts can nearly always be categorized as absolutely critical, but there are some fundamental issues with how fonts are discovered and loaded:

We wait for the CSS to be loaded, parsed and applied before @font-face rules are discovered.
A font is not added to the browser’s network queue until it matches up its CSS rules to the DOM via the selectors.
This selector matching occurs during style recalculation. It doesn’t necessarily happen immediately after download. It can be delayed if the main thread is busy.

In most cases, fonts are delayed by a number of seconds, just because we’re not instructing the browser to download them in a timely fashion.

On a mobile device with a slow CPU, laggy connectivity, and without a properly-constructed fallback this can be an absolute deal breaker.

Preload in action: fonts

I ran two tests against calibreapp.com. On the first run, I’d changed nothing about the site at all. On the second, I added these two tags:

<link rel=”preload” as=”font” href=”” type=”font/woff2″ crossorigin />

<link rel=”preload” as=”font” href=”” type=”font/woff2″ crossorigin />

Below, you’ll see a visual comparison of the rendering of these two tests. The results are quite staggering:

The page rendered 3.5 seconds faster when the fonts were preloaded.

Bottom: Fonts are preloaded — The site finishes rendering in 5 seconds on a “emerging markets” 3G connection.

<link rel=”preload”> also accepts a media=”” attribute, which will selectively prioritize resources based on @media query rules:

<link rel=”preload” href=”article-lead-sm.jpg” as=”image” type=”image/jpeg” media=”only screen and (max-width: 48rem)”>

Here, we’re able to preload a particular image for small screen devices. Perfect for that “main hero image”.

As demonstrated above, a simple audit and a couple of tags later and we’ve vastly improved the delivery & render phase. Super.

Getting tough on web fonts

69% of sites use web fonts, and unfortunately, they’re providing a sub-par experience in most cases. They appear, then disappear, then appear again, change weights and jolt the page around during the render sequence.

Frankly, this sucks on almost every level.

As you’ve seen above, controlling the request order and priority of fonts has a massive effect on render speed. It’s clear that we should be looking to prioritize web font requests in most cases.

We can make further improvements using the CSS font-display property. allows us to control how fonts display during the process of web fonts being requested and loaded.

There are 4 options at your disposal, but I’d suggest using font-display: swap;, which will show the fallback font until the web font has loaded—at which point it’ll be replaced.

Given a font stack like this:

body {
font-family: Calibre, Helvetica, Arial;
}

The browser will display Helvetica (or Arial, if you don’t have Helvetica) until the Calibre font has loaded. Right now, Chrome and Opera are the only browsers that support font-display, but it’s a step forward, and there’s no reason to not use it starting today.

Keeping on top of page performance

As you’re well aware, websites are never “complete”. There are always improvements to be made and it can feel overwhelming, quickly.

Calibre is an automated tool for auditing performance, accessibility and web best practices, it’ll help you stay on top of things.

As you’ve seen above, there are a few metrics that are key to understanding user performance.

First paint, tells us when the browser goes from “nothing to something”.
First meaningful paint, tells us when the browser has “rendered something useful”.
Finally, First Interactive will tell you when the page has fully rendered, and the JavaScript main thread has settled (low CPU activity for a number of seconds).

Here, we set a budget on CNN’s “First meaningful paint” for <5 seconds.

You can set budgets against all these key user experience metrics. When those budgets are exceeded (or met) your team will be notified by Slack, email or wherever you like.

Calibre displays network request priority, so you can be sure of the requests being made. Tweak priorities and improve performance.

I hope that you’ve learned some valuable skills to audit requests and their priorities, as well as sparked a few ideas to experiment with to make meaningful performance improvements.

Your critical request checklist:

✅ Enable the Priority column in Chrome DevTools.
✅ Decide which requests must be made before users can see a fully rendered page.
✅ Reduce the number of required critical requests where possible.
✅ Use for assets that will probably be used on the next page of the site.
✅ Use [Link: <https://example.com/other/styles.css>; rel=preload; as=style](https://www.w3.org/TR/preload/) nopush HTTP headers to tell the browser which resources to preload before the HTML has been fully delivered.
🚫 HTTP/2 Server push is thorny. Probably avoid it. (See this informative document by Tom Bergan, Simon Pelchat and Michael Buettner, as well as Jake Archibald’s “HTTP/2 Push is tougher than I thought”)
✅ Use font-display: swap; with web fonts where possible.
⏱ Are web fonts being used? Can they be removed?
If no: Prioritise them and use WOFF2!
⏱ Is a late loading script delaying your single page app from displaying anything at all?
📹 Check this great free screencast by Front End Center that shows how load webfonts with the best possible fallback experience.
🔍 View chrome://net-internals/#events and load a page — this logs network related events.
No request is faster than no request. ✌️

The Critical Request is a post from CSS-Tricks

Desktop Wallpaper Calendars for August 2012

Original Source: http://feedproxy.google.com/~r/visualswirl/~3/mPdgqux3QOM/

August desktop calendars just a couple days late. This collection of desktop calendar wallpapers will help keep your desktops fresh as we roll through the rest of the summer. As always, I’ve hand-picked wallpapers from talented artists and designers  around the web. Feel free to share your favorites and check back next month for some great new desktop calendars. As always, if you’d like to include your own design in future roundups, let me know.

7 Beautiful Desktop Wallpapers for August 2012
Wallpaper by Call Me Victorian

August Flower Calendar Wallpaper

Wallpaper by Paper Leaf

August Desktop Calendar

Wallpaper by Oana Befort

August Blue Whale Wallpaper

Wallpaper by Kriegs

Vintage August Wallpaper

Wallpaper by Kinnon Elliott

Wallpaper by Sarah Hearts

Wallpaper by Happy Serendipity

 

The post Desktop Wallpaper Calendars for August 2012 appeared first on Visual Swirl Design Resources.