Development – AlbeBaubles https://albebaubles.com Mobile & IoT Development Wed, 04 Dec 2024 17:47:58 +0000 en hourly 1 https://wordpress.org/?v=6.8.1 https://albebaubles.com/wp-content/uploads/2019/10/cropped-247306-3-32x32.png Development – AlbeBaubles https://albebaubles.com 32 32 Sonos’ $30M app fail is cautionary tale against rushing unnecessary updates | Ars Technica https://albebaubles.com/development/sonos-30m-app-fail-is-cautionary-tale-against-rushing-unnecessary-updates-ars-technica/ https://albebaubles.com/development/sonos-30m-app-fail-is-cautionary-tale-against-rushing-unnecessary-updates-ars-technica/#respond Wed, 04 Dec 2024 17:47:58 +0000 https://albebaubles.com/?p=1038 Continue reading Sonos’ $30M app fail is cautionary tale against rushing unnecessary updates | Ars Technica]]> Great lesson on how to booger up a software rollout.

Sonos’ $30M app fail is cautionary tale against rushing unnecessary updates | Ars Technica:

The app situation has become a headwind to existing product sales, and we believe our focus needs to be addressing the app ahead of everything else. This means delaying the two major new product releases we had planned for Q4 until our app experience meets the level of quality that we, our customers, and our partners expect from Sonos.

]]>
https://albebaubles.com/development/sonos-30m-app-fail-is-cautionary-tale-against-rushing-unnecessary-updates-ars-technica/feed/ 0
Proposal: Swift Extension Naming Convention https://albebaubles.com/swift/proposal-swift-extension-naming-convention/ https://albebaubles.com/swift/proposal-swift-extension-naming-convention/#respond Wed, 03 Jul 2024 00:58:47 +0000 https://albebaubles.com/?p=1011 Continue reading Proposal: Swift Extension Naming Convention]]> Proposal: Standardizing Naming Conventions for Extension Files

Introduction

As a consultant with extensive experience in software development, I have observed a wide range of naming methodologies employed across various projects and organizations. One area that often lacks standardization is the naming convention for extension files. The inconsistency in naming conventions can lead to confusion, reduced code readability, and increased maintenance overhead.

Proposal

To address this issue, I propose adopting a standardized naming convention for extension files: (classname).Extension.

Justification

1. Clarity
Naming the extension file as “(classname).Extension” provides immediate clarity about the file’s purpose. It clearly indicates that the file contains extensions for a specific class or structure, reducing ambiguity and helping developers quickly understand the file’s role without needing to delve into its contents.

2. Organization
This naming convention aids in organizing files within a project. When files are named consistently, it becomes easier to locate and manage them. For instance, if you have a class named Customer, the Customer.Extension file will be instantly recognizable as containing extensions related to the Customer class.

3. Consistency
Applying a standard naming convention across the project or organization ensures consistency. This is particularly beneficial in larger teams or projects where multiple developers are working on the same codebase. Consistent naming conventions reduce cognitive load and streamline onboarding for new team members.

4. Searchability
Using a consistent naming pattern makes it easier to search for related files. If you need to find all extensions, you can simply search for “.Extension” within your codebase.

5. Documentation and Communication
A standard naming convention facilitates clear and concise communication in meetings and documentation. For example, instructing a colleague to “check the Order.Extension file” immediately conveys where to look.

Implementation Example

Consider a project with the following classes and structures:

Customer.cs
Order.cs
Product.cs

Using the proposed naming convention, the corresponding extension files would be:

Customer.Extension.cs
Order.Extension.cs
Product.Extension.cs

This approach makes it evident that each extension file is related to its respective class, thereby enhancing code organization and developer efficiency.

Implementation Plan

1. Team Adoption
Ensure that all team members are aware of and adhere to this naming convention. Conduct a workshop or meeting to discuss the benefits and implementation of the new convention.

2. Update Existing Files
If the project is already in progress, consider renaming existing extension files to match the new convention. This can be done incrementally to avoid disrupting ongoing development.

3. Integrate into Guidelines
Include this naming convention in your project’s coding guidelines or style guide. This ensures that new code adheres to the standard and helps maintain consistency over time.

4. Automated Enforcement
Consider using code analysis tools or scripts to enforce the naming convention. These tools can automatically check file names and alert developers to any deviations from the standard.

Conclusion

Adopting the proposed naming convention for extension files—(classname).Extension—will improve the clarity, organization, and consistency of your codebase. This standardization will enhance developer efficiency, streamline communication, and make it easier to maintain and scale your projects. I encourage you to consider implementing this convention and look forward to discussing its potential benefits further.

UntitledImage

]]>
https://albebaubles.com/swift/proposal-swift-extension-naming-convention/feed/ 0
Finding unused Swift variables https://albebaubles.com/swift/finding-unused-swift-variables/ https://albebaubles.com/swift/finding-unused-swift-variables/#respond Tue, 02 Apr 2024 17:33:56 +0000 https://albebaubles.com/?p=948 Nifty little script (from Paul Taykalo) to find unused variables in swift code.

PaulTaykalo/swift-scripts:

UntitledImage

]]>
https://albebaubles.com/swift/finding-unused-swift-variables/feed/ 0
Michael Tsai – Blog – Pkl Programming Language https://albebaubles.com/opinion/michael-tsai-blog-pkl-programming-language/ https://albebaubles.com/opinion/michael-tsai-blog-pkl-programming-language/#respond Sat, 24 Feb 2024 14:43:02 +0000 https://albebaubles.com/?p=932 Continue reading Michael Tsai – Blog – Pkl Programming Language]]> Pickle! Love the name! I haven’t had a chance to put this in action, but I expect this to be big.

Michael Tsai – Blog – Pkl Programming Language:

We created Pkl because we think that configuration is best expressed as a blend between a static language and a general-purpose programming language. We want to take the best of both worlds; to provide a language that is declarative and simple to read and write, but enhanced with capabilities borrowed from general-purpose languages.

]]>
https://albebaubles.com/opinion/michael-tsai-blog-pkl-programming-language/feed/ 0
Milracks – AlbeBaubles https://albebaubles.com/swift/milracks-albebaubles/ https://albebaubles.com/swift/milracks-albebaubles/#respond Sat, 24 Feb 2024 14:38:48 +0000 https://albebaubles.com/?p=930 Check out our newest app on the App Store! 100% SwiftUI.

Milracks – AlbeBaubles:

]]>
https://albebaubles.com/swift/milracks-albebaubles/feed/ 0
Too easy https://albebaubles.com/swift/too-easy/ https://albebaubles.com/swift/too-easy/#respond Sat, 19 Feb 2022 04:10:07 +0000 https://albebaubles.com/?p=554 A great example of how simple it is to construct a user interface in swiftUI

UntitledImage UntitledImage

]]>
https://albebaubles.com/swift/too-easy/feed/ 0
Extending UIColor https://albebaubles.com/swift/extending-uicolor/ https://albebaubles.com/swift/extending-uicolor/#respond Thu, 10 Feb 2022 01:13:04 +0000 https://albebaubles.com/?p=497 I use this so often I’ve added it to my global utilities class.  Seriously considering taking all my extensions open source – since I use in my utilities class at all clients.

extension UIColor {
    public func uiImage(_ size: CGSize = CGSize(width: 0.1, height: 0.1)) -> UIImage {
        UIGraphicsImageRenderer(size: size).image { rendererContext in
            self.setFill()
            rendererContext.fill(CGRect(origin: .zero, size: size))
        }
    }

	 /// creates a cgImage from this color
	 /// - Parameter size: (CGSize) the size of the image
	 /// - Returns: cgImage
  public func cgImage(_ size: CGSize = CGSize(width: 0.1, height: 0.1)) -> CGImage {
        self.uiImage(size).cgImage!
    }

	 /// creates a square Swift Image with this color as background
	 /// - Parameters:
	 ///   - size: size of the image to be created
	 ///   - label: text to dispaly within the image
	 /// - Returns: cgImage
    public func swiftImage(_ size: CGSize = CGSize(width: 0.1, height: 0.1),
                           _ label: String = String.empty) -> Image {
        Image(self.cgImage(size), scale: CGFloat(2), label: Text(verbatim: label))
    }


	 /// creates a Swift Color from this UIColor
	 /// - Returns: Swift Color
  public func swiftColor() -> Color {
	 Color(self)
  }
}

 

]]>
https://albebaubles.com/swift/extending-uicolor/feed/ 0
Utility – JSON Formatter https://albebaubles.com/development/utility-json-formatter/ https://albebaubles.com/development/utility-json-formatter/#respond Mon, 31 May 2021 18:13:08 +0000 https://albebaubles.com/?p=410 The other day I was bringing up a browser to search for a website to format some raw JSON I was looking at.  It occurred to me I do this often enough that I should create my own and it it to the site.  

Developers, I give you:

JSON Formatter

UntitledImage

]]>
https://albebaubles.com/development/utility-json-formatter/feed/ 0
Full-screen development with Xcode and the Simulator https://albebaubles.com/development/full-screen-development-with-xcode-and-the-simulator/ https://albebaubles.com/development/full-screen-development-with-xcode-and-the-simulator/#respond Wed, 02 Dec 2020 22:43:22 +0000 https://albebaubles.com/?p=241  

Big shout out to @twannl for this awesome tip detailing how to use the simulator and Xcode in a single fullscreen.  Very helpful.

 

Xcode simulator full screen mode

 

 

https://www.avanderlee.com/workflow/full-screen-xcode-simulator/

]]>
https://albebaubles.com/development/full-screen-development-with-xcode-and-the-simulator/feed/ 0
Michael Tsai – Blog – Funneling Into Apple News+ https://albebaubles.com/development/michael-tsai-blog-funneling-into-apple-news/ https://albebaubles.com/development/michael-tsai-blog-funneling-into-apple-news/#respond Tue, 11 Aug 2020 02:27:16 +0000 https://albebaubles.com/?p=215 Continue reading Michael Tsai – Blog – Funneling Into Apple News+]]> This is getting out of hand.  Apple is starting to act like Microsoft in the late 90’s.

Michael Tsai – Blog – Funneling Into Apple News+:

I wonder how many publishers in Apple News+ realize that the new iOS14 and MacOS Big Sur are by default intercepting traffic to their sites and sending it to the Apple News app instead.

]]>
https://albebaubles.com/development/michael-tsai-blog-funneling-into-apple-news/feed/ 0
SF Symbols https://albebaubles.com/development/sf-symbols/ https://albebaubles.com/development/sf-symbols/#respond Tue, 11 Aug 2020 01:29:13 +0000 https://albebaubles.com/?p=208 Continue reading SF Symbols]]> I was asking Michael Collins about using .otf fonts in open source projects and he pointed me to SF Symbols.  

This is the best place to go for text/glyphs/symbols/svgs for your Xcode projects. Symbols supports OpenType, multicolor and supports iOS, iPad OS and macOS Big Sur. 

0 Hms3aSBMUbGeLoGB

Be sure to download the SF Symbols Beta HERE

 

Check it out SF Symbols 2 here

]]>
https://albebaubles.com/development/sf-symbols/feed/ 0
JetBrains Mono Font -A Typeface for Developers https://albebaubles.com/development/jetbrains-mono-font-a-typeface-for-developers/ https://albebaubles.com/development/jetbrains-mono-font-a-typeface-for-developers/#respond Tue, 21 Jan 2020 18:01:45 +0000 http://albebaubles.com/?p=113 Checkout the new free font from JetBrains created just for developers.  Im using it in Xcode.

https://www.jetbrains.com/lp/mono/

 

UntitledImage 

]]>
https://albebaubles.com/development/jetbrains-mono-font-a-typeface-for-developers/feed/ 0
Ad block – AlbeBlocksAnnoyances https://albebaubles.com/swift/ad-block-albeblocksannoyances/ https://albebaubles.com/swift/ad-block-albeblocksannoyances/#respond Sun, 12 Jan 2020 16:56:02 +0000 http://albebaubles.com/?p=109 Continue reading Ad block – AlbeBlocksAnnoyances]]> [UPDATED TO SUPPORT iOS]

I quit using Facebook well over a year ago, yet anytime my browser takes me there it shows me logged in.  I DO connect to FB on my oculus – no choice.  I don’t know how, but it sure seems using the oculus somehow communicates with my Mac and logs me into FB.

I took matters into my own hands, and wrote a quick Safari extension that blocks all things Facebook, as well as 3500 or more ad sites.

The app is open source and available at:

 

https://github.com/albebaubles/AlbeBlocksAnnoyances

 

 

NewImage

]]>
https://albebaubles.com/swift/ad-block-albeblocksannoyances/feed/ 0
WTF Auto Layout? https://albebaubles.com/development/wtf-auto-layout/ https://albebaubles.com/development/wtf-auto-layout/#respond Tue, 29 Oct 2019 19:49:45 +0000 http://www.albebaubles.com/?p=60 Deciphering auto layout errors can be a real pain. johnpatrickmorgan created a nifty website to help:

WTF Auto Layout?

]]>
https://albebaubles.com/development/wtf-auto-layout/feed/ 0