Jorik is the new fashion label launched and designed by the Dutch celebrity power couple Jorik Scholten (aka Lil Kleine) and Jaimie Vaes, and we had the… via Tumblr Case Study: Jorik
0 Comments
A not uncommon pattern is to use a dictionary, or array as a lookup table in place of a switch or conditional. In some languages, like Python, there is no switch statement, and dictionaries are the main way to imitate that behavior. In languages like JavaScript, where the line between objects and dictionaries is blurred to the point of non-existence, it’s a common approach. A lot of switch statements can be converted to an object literal with functions as its values, e.g.:
Cassi had a co-worker who was at least peripherally aware of this technique. They might have heard about it, and maybe they saw it used once, from a distance, on a foggy day and their glasses were covered with rain and they also weren’t actually paying attention. When they needed to convert a day, represented as a number from 1–7, into a day-as-a-string, they wrote some code which looks like this:
We’ll get to Yes, it would be simpler to have just done
Simulates a switch statement (with fewer lines of code), they say. In reality, they’ve simulated a lookup table with more lines of code, and as a bonus, this needs to inspect every element (until it finds a match), versus a lookup table which only needs to directly access the match. Whether or not Cassi fixes the I can only assume/hope that Cassi will be switching jobs, shortly. //thedailywtf.com/images/highlight/highlight.pack.js
[Advertisement]
Forget logs. Next time you’re struggling to replicate error, crash and performance issues in your apps – Think Raygun! Installs in minutes. Learn more.
via Tumblr CodeSOD: Switching Daily “Procedures should be as small as possible,” is good advice. Like any good advice, you can take it too far. Mike recently was asked to upgrade a SQL Sever 2000 database to SQL Server 2016. Since this was an upgrade, Mike wasn’t supposed to make any changes beyond the necessary changes to make the upgrade work. Still, when he found a bunch of methods with the same basic naming pattern, he had to investigate. CREATE PROCEDURE [dbo].[sp_inchworm_1wk] AS BEGIN INSERT INTO #inchworm_1wk(…) -- seven records get inserted EXEC sp_inchworm_1wk_a1 @fiscal_wk_end_date,@vendor_flag END GO CREATE PROCEDURE [dbo].[sp_inchworm_1wk_a1] AS BEGIN INSERT INTO #inchworm_1wk_a1 SELECT * FROM #inchworm_1wk; EXEC sp_inchworm_1wk_a2 @fiscal_wk_end_date,@vendor_flag END GO CREATE PROCEDURE [dbo].[sp_inchworm_1wk_a2] AS BEGIN INSERT INTO #inchworm_1wk_a2 SELECT * FROM #inchworm_1wk_a1; EXEC sp_inchworm_1wk_a3 @fiscal_wk_end_date,@vendor_flag END GO CREATE PROCEDURE [dbo].[sp_inchworm_1wk_a3] AS BEGIN INSERT INTO #inchworm_1wk_a3 SELECT * FROM #inchworm_1wk_a2; IF @vendor_flag = 1 EXEC sp_inchworm_1wk_a4a @fiscal_wk_end_date,@vendor_flag ELSE EXEC sp_inchworm_1wk_a4b @fiscal_wk_end_date,@vendor_flag END GO CREATE PROCEDURE [dbo].[sp_inchworm_1wk_a4a] AS BEGIN INSERT INTO #inchworm_1wk_a4a SELECT * FROM #inchworm_1wk_a3; EXEC sp_inchworm_1wk_a5a @fiscal_wk_end_date,@vendor_flag END GO CREATE PROCEDURE [dbo].[sp_inchworm_1wk_a4b] AS BEGIN INSERT INTO #inchworm_1wk_a4b SELECT * FROM #inchworm_1wk_a3; EXEC sp_inchworm_1wk_a5b @fiscal_wk_end_date,@vendor_flag END GO CREATE PROCEDURE [dbo].[sp_inchworm_1wk_a5a] (@fiscal_wk_end_date SMALLDATETIME ,@vendor_flag TINYINT) AS BEGIN INSERT INTO #inchworm_1wk_a5a SELECT * FROM #inchworm_1wk_a4a; EXEC sp_inchworm_1wk_a6 @fiscal_wk_end_date,@vendor_flag END GO CREATE PROCEDURE [dbo].[sp_inchworm_1wk_a5b] (@fiscal_wk_end_date SMALLDATETIME ,@vendor_flag TINYINT) AS BEGIN INSERT INTO #inchworm_1wk_a5b SELECT * FROM #inchworm_1wk_a4b; EXEC sp_inchworm_1wk_a6 @fiscal_wk_end_date,@vendor_flag END GO CREATE PROCEDURE [dbo].[sp_inchworm_1wk_a6] (@fiscal_wk_end_date SMALLDATETIME ,@vendor_flag TINYINT) AS BEGIN INSERT INTO #inchworm_1wk_a6 SELECT * FROM #inchworm_1wk_a5a; INSERT INTO #inchworm_1wk_a6 SELECT * FROM #inchworm_1wk_a5b; IF @vendor_flag = 1 EXEC sp_inchworm_1wk_a7a @fiscal_wk_end_date,@vendor_flag ELSE EXEC sp_inchworm_1wk_a7b @fiscal_wk_end_date,@vendor_flag END GO CREATE PROCEDURE [dbo].[sp_inchworm_1wk_a7a] (@fiscal_wk_end_date SMALLDATETIME ,@vendor_flag TINYINT) AS BEGIN INSERT INTO #inchworm_1wk_a7a SELECT * FROM #inchworm_1wk_a6; EXEC sp_inchworm_1wk_a8 END GO CREATE PROCEDURE [dbo].[sp_inchworm_1wk_a7b] (@fiscal_wk_end_date SMALLDATETIME ,@vendor_flag TINYINT) AS BEGIN INSERT INTO #inchworm_1wk_a7b SELECT * FROM #inchworm_1wk_a6; EXEC sp_inchworm_1wk_a8 END GO CREATE PROCEDURE [dbo].[sp_inchworm_1wk_a8] AS BEGIN INSERT INTO #inchworm_1wk_a8 SELECT * FROM #inchworm_1wk_a7a; INSERT INTO #inchworm_1wk_a8 SELECT * FROM #inchworm_1wk_a7b; EXEC sp_inchworm_1wk_a9 END GO CREATE PROCEDURE [dbo].[sp_inchworm_1wk_a9] AS BEGIN -- returns final data set END GO
[Advertisement]
Talk: How To Design For Whats Next Executive Director Experience Design AKQA | David Vogel4/30/2019 David Vogel is Executive Director, Experience Design at AKQA (Europe) where he creates delightful products and experiences that add value for consumers.At… via Tumblr Talk: How To Design For What’s Next, Executive Director, Experience Design AKQA | David Vogel Today at DockerCon, we’re excited to announce Docker Enterprise 3.0 – the only desktop-to-cloud enterprise container platform enabling organizations to build and share any application and securely run them anywhere – from hybrid cloud to the edge. With Docker Enterprise 3.0, developers can rapidly build multi-service container-based applications right from their desktop and package them in a standardized format that can be shared seamlessly and run anywhere. In addition, Docker Enterprise 3.0 expands its container platform leadership position with the introduction of new capabilities for automated lifecycle management and enhanced security. Here are some of the highlights that you can look forward to in Docker Enterprise 3.0. Accelerated application deliveryEnterprises are looking for ways to quickly adapt to new competitive challenges and changing customer requirements through the introduction of new applications. Docker Enterprise 3.0 introduces a number of capabilities that help organizations accelerate application delivery. Docker Desktop EnterpriseDocker Desktop Enterprise is a new developer tool that extends the Docker Enterprise Platform to developers’ desktops, improving developer productivity while accelerating time-to-market for new applications.
Docker ApplicationDocker Application is a new set of tooling that enables end-to-end application consistency and scalability from developers to operators. It allows users to manage complex applications as simply as individual containers, with tools to build, push, and deploy multi-container applications as self-contained objects.
Docker Kubernetes Service (DKS)Docker Enterprise 3.0 introduces Docker Kubernetes Service – the only offering that integrates Kubernetes from the developer desktop to production servers. This will make Kubernetes easier, more secure, and more accessible to the entire organization.
Automated deployment of containers on your choice of infrastructureDocker Enterprise 3.0 includes new lifecycle automation tools for day 1 and day 2 operations, helping customers accelerate and expand the deployment of containers on their choice of infrastructure.
Enhanced securityDocker Enterprise 3.0 includes additional security enhancements that expand the set of applications that can be addressed with Docker Enterprise and the types of organizations that can deploy it.
How to Get Started[Tweet “Big News! Introducing Docker Enterprise 3.0 – delivering high-velocity innovation from the desktop to the cloud”] The post Announcing Docker Enterprise 3.0: Delivering High-Velocity Application Innovation appeared first on Docker Blog. Announcing Docker Enterprise 3.0: Delivering High-Velocity Application Innovation syndicated from https://koresol.blogspot.com/ via Tumblr Announcing Docker Enterprise 3.0: Delivering High-Velocity Application Innovation We are thrilled to honor six of our enterprise customers with the 2019 Docker Customer Innovation Award today at DockerCon. We launched the awards last year to recognize customers who stand out for how they are using Docker Enterprise to drive transformation within IT and their business. These are companies ranging from cruise lines to established “brick and mortar” enterprises, some of whom have been in business for well over 100 years. These are their stories. Creating Exceptional Experiences: Carnival Corporation
Carnival’s first commitment is to creating fun, memorable and safe experiences for its guests. As the largest cruise line in the world, Carnival hosts over 12 million customers annually on 110 ships and at 15 resorts. Technology plays a key role in providing a world-class consistent customer experience. Carnival leverages Docker Enterprise to build, run and update over 300 services on its new Medallion System, a necklace or wrist band IoT token unique to each passenger used to pay for drinks or as a key to your room. Adding or changes services, or testing new ones, is easy with the Docker Enterprise platform. The system is running on two ships today, with plans to expand this year to six more ships. Culture Transformation Award: Citizens Bank
Home mortgages call to mind endless paperwork, not digital innovation. The Citizens Bank mortgage division established an innovation team to challenge the core assumption that the bank had to move slowly and carefully when it changed or added any services. Rapid innovation supported by Docker Enterprise now allows the team to “fail fearlessly” and take new ideas from concept to running in a week — without putting the bank at risk. Before Docker, the team only managed a few software deployments a week. Today, they average over 200 deployments daily and run over 2,000 containers. Digital Transformation: Liberty Mutual
What do you do if you have 106 years of accumulated technical debt but need to evolve and offer new digital services to remain competitive? Liberty Mutual started its digital transformation journey in 2016 by changing the way it builds software, using Docker Enterprise as the catalyst. Through the company’s partnership with Docker, Liberty Mutual has been able to modernize traditional applications, and move these to the cloud in a more automated, portable, and cost-effective way, as well as enable new teams to write modern services quickly building on from open technologies. “Docker has been a transformational technology. It helped us dissolve our previous assumptions about how app development, operations and security could be done.”
Global Impact: Lindsay Corporation
Lindsay started out as an industrial agricultural equipment manufacturer in the 1950s. Even ten years ago, their primary product was steel-based sprinkler systems for farms. Today, Linday is an IoT company that delivers value to customers through sophisticated software and sensors. Core to Lindsay’s mission — feeding the world’s growing population in the most sustainable way possible. That means using its software to make intelligent decisions about watering crops, increasing yields and saving 700 billion gallons of water in the process. Docker Enterprise helps Lindsay build, test and deliver new capabilities to farmers rapidly. “Whether it’s feeding 10 billion people by 2050 or helping to conserve the water resources that we have on earth, with our new architecture based on Docker Enterprise, the sky is really the limit.” — Brian Magnusson, VP Technology and Innovation CIO of the Year: Nationwide
In 2014, it took three years to complete a software project at Nationwide — far too long to keep up with the rapid shift to digital. Even a simple software deployment took a week. IT undertook an initiative to turn that on its head. Fast forward to today and a software deployment at Nationwide takes an hour, a 100x improvement. Critical applications in the Life, Property & Casualty and Claims business units have been containerized with Docker Enterprise. The company estimated it already saves $2 million a year in application costs. The company has a “container first” strategy and plans to migrate all existing apps to containers by 2021. Operating at Scale: Visa
Visa processed $11 trillion in transactions in over 160 currencies last year. How does the world’s largest payment company scale to 65,000+ transactions a second? By containerizing two critical payment services on Docker Enterprise, Visa achieved a 10x increase in scalability and handled over 100 million transactions on Black Friday. It can scale rapidly from 100 to 800 containers to meet demand, while maintaining efficient infrastructure utilization. We’re pleased to recognize these six customer with the 2019 Docker Customer Innovation Award. New blog: #Docker Customer Innovation Awards recognize digital transformation @CarnivalPLC, @CitizensBank, @Work at Liberty, @LindsayIrrigate, @Nationwide, @Visa The post 2019 Customer Innovation awards: 6 Stories of Transformation in the Enterprise appeared first on Docker Blog. 2019 Customer Innovation awards: 6 Stories of Transformation in the Enterprise syndicated from https://koresol.blogspot.com/ via Tumblr 2019 Customer Innovation awards: 6 Stories of Transformation in the Enterprise Vote Now for Aprils Site of the Month and Win a Years Free Pro Plan in the Awwwards Directory!4/30/2019 Checking out our Site of the Month nominees is one of the quickest ways you can get inspiration from the best projects on the web right now. Have a look… via Tumblr Vote Now for April’s Site of the Month and Win a Year’s Free Pro Plan in the Awwwards Directory! Myrtis joined Initech as their first on-staff software developer. Up to that point, Initech outsourced all the software development on their payroll/billing system. The contractor kept raising their rates, Initech’s business needs kept growing, and eventually they decided it was time to hire an in-house developer. Which meant Myrtis got to inherit all of that outsourced development. All that code, all of which had some pretty significant financial implications if it contained any bugs or errors, all developed by a third-party to a third-party. Imagine, for example, that you need to round to the nearest quarter. That is to say,
The hand-coded break-points for the rounding are almost acceptible, since there are only four of them. You couldn’t rely on one of the built-in rounding methods to handle that specific case. Speaking of built-in rounding methods, why use that at all? If you want the integer part of a number, you can just The real, WTF, though, is knowing that this is financial data. Even though we’re rounding to a fairly low precision result, all the inputs and all the outputs are //thedailywtf.com/images/highlight/highlight.pack.js
[Advertisement]
BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!
via Tumblr CodeSOD: How Many Quarters to a Dollar? Sometimes the writing is on the wall; sometimes, you know you have to get out. Today’s submitter, Pietyr, was in just that sort of situation. He decided to head for greener pastures, hoping for a job with a good atmosphere, someplace where he could take it easier and enjoy his work more. Initech was a startup, one that didn’t have any clients yet. No external deadline pressure, just venture funding and free beer Fridays. Pietyr gave them a call and spoke with their receptionist-who-was-also-HR, Chrysanthemum. “May I call you Chrissy?” he asked, trying not to laugh. “You can call me anything you like, Sugar, so long as it’s not ‘late for dinner.’” Pietyr scored an interview same day—"Come on over when you get a chance, darling, we’re here all afternoon"—and so, at 4:00, he called off for a doctor’s appointment and drove to the site. It was a suite in a larger building, all one dim room, lit mostly by Christmas lights … in March. A dozen people crowded onto long tables, plugging away at MacBooks, entirely uninterested in his arrival. While Chrissy answered phones, he watched a good ten minutes of Kindergarten Cop on the large TV they clearly had on for white noise in the background. At least it’s different, he told himself. “Mr. Taberd will see you now,” Chrissy said, interrupting Arnold. “Ah, right. And that is …?” “The CTO.” With no further preparation than that, he was ushered into a side room, little bigger than a closet, into which a lean blond man and a midsize desk had been crammed unceremoniously. He shook hands, sat, and let the CTO do most of the talking. “What’s the biggest issue with cloud computing?” Mr. Taberd finally asked, leaning forward. “Security?” guessed Pietyr. “Wrong! It’s monitoring. When you don’t have access to the servers, you don’t know what they’re doing! But that’s where Initech comes in,” boasted the blond, in what was clearly a prepared elevator pitch. “Windows is always doing things under the hood, and it’s impossible to tell what at scale. Not without a centralized system. What we’re doing here is hooking the Windows API calls—” “Which ones?” “All of them! Every API in the user, gdi, and networking DLLs, plus some of the internal kernel functions. We hook them through a backdoor my boys have cooked up, save off all the parameters whenever they’re called. Our background process reads those parameters from shared memory, ships them to a cluster of databases—we’re doing about 250 elastisearch instances per server—and reads it all into our responsive web frontend. That way you know exactly what it’s doing at all times!” Pietyr could tell right away it would never work. Not even in Windows XP, let alone more secure versions. Too much overhead; it would bring the monitored server to its knees. But, on the other hand, free beer. And hey, if the product never sold, he could kick back and take it easy, right? As soon as Tabard mentioned free lunch every day—"Thanks to our Venture Capital funds!“—he was in. He took the job, working on the low-level hook code so that all the cloud nonsense was someone else’s problem. A month later, he received a letter informing him his shares were effectively worthless. Fine by him, since he had no shares anyway. It took another month before he casually asked a coworker how long they’d been working there. "Oh, not long. Only about two years.” “Really? You must have been here since the beginning then, or nearly,” Pietyr commented. He would have guessed from the codebase the company had only been running six months or so, but he kept that to himself. “No, no. Jan has been here all seven years, I’ve only been here two.” Pietyr stared. “Seven years?! You’ve been working on this with no customers for seven years?!” “Well, I heard a rumor we’ve got a client about to sign up for the beta.” “A rumor.” Pietyr sighed, firmly placing the conversation in the not-my-business bucket, and got on with his work. Still, the sense of unease didn’t leave him. A month after that, the unthinkable happened: Taberd not only left his little office, but turned off the television. “Alright, everyone, listen up! Stop what you’re doing. We’re out of money.” And just like that, Pietyr was back on the job market. That day, he learned a valuable lesson: don’t let free beer convince you to ignore red flags.
[Advertisement]
BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!
via Tumblr All That Glitters “Behold how TDWTF commenters get their start in life!” Adam G. writes. “We have this cable company called UPC here in Slovakia, and my freshly installed router failed showing Schrodinger’s Connection symptoms,” writes Daniel. Mark J. wrote, “Apparently, AliExpress chooses its customers very carefully. "I don’t think that Medium knows what humor really is…or does it?” Bellons writes. Tobias H. wrote, “While reading an article on heise.de, something apparently happened…or not?” “While trying to purchase Satisfactory I got this message that aims to warn those who are not yet born,” writes Nigel.
[Advertisement]
Forget logs. Next time you’re struggling to replicate error, crash and performance issues in your apps – Think Raygun! Installs in minutes. Learn more.
via Tumblr Error’d: Error Inception |
About Us:Dive deep into a topic with Appeared, learning both how and why things work. Come and be a part of our group if you are looking for a collection of articles on software development and computer programming. I am an experienced and enthusiastic computer programmer who prefers high-level languages and simple solutions. Other Profiles:
|