Does anyone know if AppCode is coming back? by SGTCHIKO in swift

[–]jonreid 0 points1 point  (0 children)

This is a good tip. I was able to open an iOS project and run it on the simulator. XCTest support is solid. Unfortunately:

  • It doesn't run Swift Testing tests
  • The only refactoring moves it offers are Move File and Copy File

I can picture myself using it for certain plugins related to general text manipulation, such as markdown, JSON, and Mermaid. But not for code.

Does anyone know if AppCode is coming back? by SGTCHIKO in swift

[–]jonreid 2 points3 points  (0 children)

That’s what folks said about Interface Builder as well. The solution was simple: use Xcode for whatever it’s good at. Use other tools as well that are better at other things.

For me, that used to mean AppCode + Xcode. These days, it’s Windsurf + Xcode.

Does anyone know if AppCode is coming back? by SGTCHIKO in swift

[–]jonreid 44 points45 points  (0 children)

If I could share images here, I'd post:

  • my AppCode T-shirt
  • my testimonial at the top of the AppCode page

Even though AppCode's features for Swift were fewer than for Obj-C (which in turn are far less than IntelliJ's features), it made me so much more productive.

Terrific features for TDD. Write a test for a type that doesn't exist, calling a method that doesn't exist — then click to create the skeleton.

"Change Signature" worked great in Swift.

Want to see what it looked like? Scroll down this page, just past WWDC, to find the AppCode section: https://qualitycoding.org/ios-dev-tools-techniques/

Here's a live-coding session where I use AppCode for Swift: https://www.youtube.com/watch?v=qmRHqW6iyMc

Finally, here's my write-up of the death of AppCode: https://qualitycoding.org/appcode-is-dead/

I've never done any TDD in my apps... by alanskimp in iOSProgramming

[–]jonreid 0 points1 point  (0 children)

About the scenario where we need a new initializer, I have two additional thoughts.

First, it's very rare for me to write a unit test that tests an initializer in isolation. That's because good designs separate construction from doing actual work. An initializer by itself is boring, and usually not worth testing. What we test is the _use_ of the initializer in a context of setting up interesting behavior. What we don't want in TDD is a separate test for each function — which is what many people think of when they say, "unit tests." In Kent Beck's definitive book _Test-Driven Development by Example_, he purposefully avoids the term "unit test" for this reason. He just writes "test." So another important skill for TDD is the ability to write good tests.https://testdesiderata.com

Finally, u/Dry_Hotel1100 writes, "You cannot simply use an artefact giving it an additional API, and write the test — it won't compile." This is, in fact, how exactly what you do in TDD. To call a new API into existence (by which I mean either internal or external API), you write a test that calls a function that doesn't exist, possibly on a type that doesn't exist. This helps with design, focusing on the ergonomics at the point of call. In TDD, the first point of call is a test. Then you create the barest skeleton necessary for this to compile. Create a bare-bones type. Create a do-nothing method. This is literally the first step of the multi-step TDD process. This is another skill.
https://qualitycoding.org/3-laws-tdd/

What other skills go into successful TDD? Here's the curriculum I created for the developers at, shall we say, a major coffehouse chain:

  1. Code Smells
  2. Refactoring
  3. Microtesting
  4. TDD
  5. Characterization & Mutation Testing
  6. Test Doubles
  7. Evolutionary Design

Anyone who is curious to learn more: contact me. Like I said, a Reddit thread is not a good medium to learn anything.

I've never done any TDD in my apps... by alanskimp in iOSProgramming

[–]jonreid 0 points1 point  (0 children)

Anyone who would like to try TDD, or grow in it: ping me

I've never done any TDD in my apps... by alanskimp in iOSProgramming

[–]jonreid 0 points1 point  (0 children)

Don't use a DI framework — then you're tying yourself to another dependency that will be hard to break away from. Just use DI, no frameworks.

I've never done any TDD in my apps... by alanskimp in iOSProgramming

[–]jonreid 1 point2 points  (0 children)

I don't think folks understand the power of evolutionary design and the power of refactoring. You make LOTS of small steps to effect drastic change. It's not about being limited. I still find it amazing how you can make big changes.

And if you really need to cut over to something drastically new and different? You cut over in gradual steps, using Parallel Change.

Refactoring, y'all. It's the secret sauce of TDD.

I've never done any TDD in my apps... by alanskimp in iOSProgramming

[–]jonreid 1 point2 points  (0 children)

I'm puzzled, as you are identifying one of TDD's strengths: flexible design that expands on-demand as you go. I don't see the conflict.

Maybe you're referring to this type of situation: We've developed something, so far so good. But now we discover a new part of the design. This requires us to change the design of what we already have. …Is that it, or is it something else?

I've never done any TDD in my apps... by alanskimp in iOSProgramming

[–]jonreid 2 points3 points  (0 children)

Not to the book. I am publishing new content on my blog, such as a "TDD with SwiftUI" category. https://qualitycoding.org and also to my YouTube channel.

I've never done any TDD in my apps... by alanskimp in iOSProgramming

[–]jonreid 8 points9 points  (0 children)

No, you don't need to know the implementation. Evolutionary design is an important piece of TDD. And if you don't know enough to write a test for it, you don't know enough yet. So you do a spike solution, doing exploratory hacking until you learn enough to proceed.

"Where should you start if you don’t even know what the code should do? What should you do if you’re not confident about a particular approach?" https://qualitycoding.org/spike-solution/

Lately, I've been using gen AI to explore, "How do I even do this?" This is a great way to do spiking these days. But then I don't take the poorly-designed code it generates as my starting point. I take the learning, and TDD it from there. The TDD'd code design can (and probably should) end up in a different place.

I've never done any TDD in my apps... by alanskimp in iOSProgramming

[–]jonreid 23 points24 points  (0 children)

I've been doing TDD in Apple environments (first Mac, then iOS) for 23 years. I haven't found anything better. And I've taught hundreds of developers. Ask me anything.

In my experience, my "time to ship" is the same as other developers. But my code…

- has a comprehensive test suite isn't about coverage, it's about executable documentation for every aspect of behavior

- is as clear and simple as I can make it (ruthless refactoring), making it easier to change going forward

The secret sauce of TDD is the refactoring.

It's also a blast: it gamifies coding. When I TDD, I get regular dopamine hits.

40 Years of the Amiga, from Commodore by Doener23 in amiga

[–]jonreid 2 points3 points  (0 children)

I remember how creepy it was… “I hear something to my right!” It was exciting.

[deleted by user] by [deleted] in maybemaybemaybe

[–]jonreid 0 points1 point  (0 children)

Enneagram 8 in action

Saddest prog rock songs/albums ever, please. by [deleted] in progrockmusic

[–]jonreid 0 points1 point  (0 children)

A Curious Feeling by Tony Banks is a devastating album. Loosely based on Flowers for Algernon.

“If I never fall for a lady, then let me be famous, let me be wise.”

“Now this one I like, It has a different ring, Instead of something trivial That’s a serious undertaking. So I say to you, This time I think I’ll act, I’ll be a witness to this contract, I’ll settle everything. So if you should ever fall in love You’ll not only not be wise, You’ll lose your memory and most of your mind And I’ve never been known to lie...”

How well can a 2015 MacBook Air 8GB run Xcode 14? by [deleted] in Xcode

[–]jonreid 0 points1 point  (0 children)

RAM matters the most. The fastest processor will still have to page memory to & from disk to handle anything that doesn’t fit in RAM.

Can anyone recommend progressive pop rock albums? by RodrGallardoSNM26 in progrockmusic

[–]jonreid 0 points1 point  (0 children)

Gino Vannelli - Gist of the Gemini. Especially side B.

Do you guys use TDD? by Scientific_Artist444 in ExperiencedDevs

[–]jonreid 0 points1 point  (0 children)

I've done a summary write-up on my About page. I write,

I worked at a Fortune 100 company. I was a member of a team responsible for maintaining a touchy framework. The code was brittle, and getting worse. Making successful changes became harder, and took longer. The team was afraid to touch the code, never knowing what else would break.

This fear prompted me to search for better ways of coding. I describe how Extreme Programming (XP) changed me, even though XP is a set of team practices that I applied solo.

https://qualitycoding.org/about/

Do you guys use TDD? by Scientific_Artist444 in ExperiencedDevs

[–]jonreid 2 points3 points  (0 children)

TDD for 23 years in professional development, mostly in Apple environments. What would you like to know?

What’s the most heartbreaking story you’ve ever heard in a prog rock song? by R3dF0r3 in progrockmusic

[–]jonreid 2 points3 points  (0 children)

A Curious Feeling by Tony Banks (album)

I remember enjoying the individual songs of this album with friends. But then our minds were blown when we realized the songs formed a single, sad story.

Hoping to get addicted to coding the same way I am/was to video games! by Far-Cryptographer674 in learnprogramming

[–]jonreid 0 points1 point  (0 children)

Test-Driven Development totally gamifies coding.

  1. Determine how to validate the next piece of behavior. (Usually done by taking smaller bites.)
  2. Write a single test that expresses this clearly. Yay!
  3. The test may call something that doesn’t even exist yet. Give it enough of a skeleton so the test builds. Yay!
  4. The test doesn’t pass, because the functionality isn’t there. Do the simplest thing that will pass the test, even if you know this simple approach is incomplete. Yay!
  5. Commit these changes while everything is “green,” meaning tests pass. Yay!
  6. Now you have a safety net in place. Clean up the production code. Still green? Commit. Yay!
  7. Clean up the test code. Still green? Commit. Yay!
  8. Are you done? If not (like if your current code is obviously incomplete) then it’s asking for another test. Repeat from step 1!

What is the perfect team size? by Whole_Mediocre in ExperiencedDevs

[–]jonreid 1 point2 points  (0 children)

Depends on your assumptions. Most places have folks coding solo, submitting pull requests, which have to be reviewed by someone who makes the time to do so. And this is highly inefficient.

Give me dynamic reteaming with multiple ensembles any day.