• 0

How do you comment?


Question

I know that commenting is a huge debate in programming. I was reading this article on Ars Technica, which is not primarily about commenting, but noticed that the person asking the question noted that he doesn't comment his code because he believes it is self-evident. However, most professional software development firms require commenting of some sort. So what is your personal opinion on commenting your code? Do you comment a lot, not at all, or somewhere inbetween? And, most importantly, why do you take that position?

As I have become a more experienced developer I have developed my own style. By most programmer's standards I believe that I comment quite a bit. I have a couple snipets of my code below, with the full source code for the class attached. (Note: The spacing is slightly screwed up. Not my fault. I blame Neowin's post editor.)


/*
xorangekiller's File System class for easy manipulation of objects on the file system.

This class is essentially a wrapper for Windows API functions.
However, unlike the file manipulation functions in the Windows API, all of these work recursively.

Windows file management functions: http://msdn.microsoft.com/en-us/library/aa364232.aspx
Windows directory management functions: http://msdn.microsoft.com/en-us/library/aa363950.aspx
*/
class xFileSystem
{
public:
// Initialization
xFileSystem();
virtual ~xFileSystem() {};
// Primary File System Utilities
bool CreateDir( const std::string File );
bool Copy( const std::string Source, const std::string Dest );
bool Move( const std::string Source, const std::string Dest );
bool Search( const std::string File, std::string Search = "", bool Case = true, bool Hidden = false, unsigned int Recurse = 0 );
bool Delete( const std::string File );
// Support File System Utilities
static bool Exists( const std::string File );
static bool IsFile( const std::string File );
static bool IsDir( const std::string File );
unsigned long long Size( const std::string File );
[/CODE]

[CODE]
/*
Search for files directories.

Callback:
Every time a matching file or directory is found, SearchCallback() is called.
If it is not overridden, it will save the found files to internal storage, which can be accessed by calling GetFoundFiles() after this function returns.

64-bit Note:
If this function is being run from a 32-bit program on 64-bit Windows you might need to call Wow64DisableWow64FsRedirection() first to allow searching 64-bit paths.
If you use the aforementioned function, don't forget to call Wow64RevertWow64FsRedirection() after it completes to revert the setting!
MSDN Documentation: http://msdn.microsoft.com/en-us/library/aa365743.aspx

Side Effects:
Be advised: If you are using the default implementation of SearchCallback(),
the vector GetFoundFiles() returns is reset (cleared) every time this function is called.

Arguments:
File [in] Directory path to search.
If you supply a file we WILL return with an error!
Search [in] [optional] Find files and directories matching this search string.
Wild characters '*' (any number of characters) and '?' (only one character) are supported.
If the parameter is left blank everything we find will be processed!
Case [in] [optional] Is the search string case sensitive?
This paramter is ignored if Search is "" or "*".
Hidden [in] [optional] Should the search include hidden files and directories?
Recurse [in] [optional] Depth to enumerate the search path.
0 Enumerate the entire path.
1 Enumerate only the base directory.
2 Enumerate the base directory and any directories it contains.
3+ Enumerate all directories up to the designated level.

Return Value:
true We found at least one file or directory matching the search parameters.
flase Nothing was found matching the search parameters.
Are you sure we have permission to access the path?
*/
bool xFileSystem::Search( const std::string File, std::string Search, bool Case, bool Hidden, unsigned int Recurse )
{
//
// Check for trouble.
//
if( !this->IsDir( File ) ) return false; // We can only search directories!
if( Search.empty() ) Search = "*"; // If the search string does not exist, search for all files.
this->FoundFiles.clear(); // Clear our found files vector.
//
// Search the source directory.
//
xDirIt Handle( File, true, Hidden, Recurse ); // Handle for iterating the directory tree.
while( Handle.It() )
{
if( this->Abort ) return false;
// Strip the full directory path.
const char * FileIt = Handle.FileName; // Pointer to the file name that we will iterate through.
const char * LastGood = Handle.FileName; // Last known valid directory path.
while( *FileIt )
{
LastGood = FileIt;
while( *FileIt && *FileIt != '\\' ) FileIt++;
if( *FileIt ) FileIt++; // We don't actually want the '\\' character itself.
};
// Pass on the file information if the file name matches our search criteria.
if( this->WildCmp( Search.c_str(), LastGood, Case ) ) this->SearchCallback( Handle.FileName, Handle.FileAttrib );
};
return true; // Assume that everything ran successfully.
}
[/CODE]

What is your opinion on my commenting? Which category do I fall into, from your perspective.

xfs_1_3_1.zip

Link to comment
https://www.neowin.net/forum/topic/1102831-how-do-you-comment/
Share on other sites

18 answers to this question

Recommended Posts

  • 0

You definitely fall into the "comment a lot" category, but as long as your keep your comments up to date, it's not necessarily a bad thing. It can prove problematic if your comments get out of sync with the actual code though.

Personally I think I sit somewhere in the middle. I believe that your comments should (for the mostpart) explain the "Why" in the code (i.e. why does this code do what it does) and let the code itself say WHAT it does. At the same time though, I think that people who insist on not commenting at all (the "all code should be self-documenting") are dangerous and make life hard for others.

For my code style, I'll generally do the following:

  • Comments at the top of the class, explaining it's purpose.
    /**
     * Unicode string class. Holds a string of unicode characters and provides methods for manipulating the string and conversion utilities.
     */
    class UnicodeString


  • Comments at the top of functions/methods explaining the method, the parameters, the return values, the exceptions returned, and any miscellaneous information relevant to users or maintainers.
    class AsciiString
    {
      /**
       *  Get a ROT-13 encrypted version of this string.
       *
       *  Parameters:
       *    iterations         The number of times to encrypt the string. Should be an odd number.
       *
       *  Return Value:
       *    The ROT-13 encrypted string. If the string is empty, an empty string will also be returned.
       *
       *  Exceptions:
       *    ArgumentException  The number of iterations provided was even
       *
       *  Remarks:
       *    - This method is useless. Seriously.
       */
      String GetRot13(int iterations = 1)
      {
        ..
      }
    }
    


  • TODO and HACK comments. In all my IDEs these are recognised as keywords in comments, and can be useful to refer to at a later date
    int SomeMethod()
    {
      // TODO: Complete this method.
      throw new NotImplementedException("This method is not currently available in the beta version of the API.");
    }
    
    PoorlyImplementedInteger GetSum(PoorlyImplementedInteger values[])
    {
      // HACK: The PoorlyImplementedInteger class does not provide operators to do basic addition, but it does provide comparison
      //       and increment so we can use a loop to do the addition. As soon as addition is implemented update this method to
      //       reflect.
      ...
    }
    


  • Explain the "why".
    string ParseMenuFromTelnetOutput(string commandString)
    {
      // Since telnet is simply just a character stream, we search for the menu input indicator ("$>") and then wait a little
      // longer in case more output is sent.
      ...
    }
    


Those examples are fairly generic, I'll often use documentation-generator syntax when applicable (in C++ I use Doxygen comments, in C# I use intellisense XML, in ruby I use rdoc, etc). I certainly try to avoid commenting every line, since it can simply end up patronising the reader, and confuse them too if the comments get out of sync with the code. Example:

// If index is zero, return false. <--- NO **** SHERLOCK!
if (0 == i) return false;

EDIT: Accidentally a code tag.

  • Like 2
  • 0

Maybe in my example function above my commenting is a bit extreme. I don't normally comment close to every line. (Actually, I didn't realize that function was like that until you pointed it out. There used to be more content there until I abstracted it into a directory iteration class.) I do, however, normally comment every interface (class, struct, function, etc.) and every variable I create. The other comments are optional: they're only there if I decided I need them. My older code tends to have more comments inside function than my newer code does though. Overall, the source I attached to my first post is representative of my commenting and style.

  • 0

Personally I think I sit somewhere in the middle. I believe that your comments should (for the mostpart) explain the "Why" in the code (i.e. why does this code do what it does) and let the code itself say WHAT it does. At the same time though, I think that people who insist on not commenting at all (the "all code should be self-documenting") are dangerous and make life hard for others.

I have another example that may fit what you are talking about, albeit a bit on the extreme side. I created the rather large comment block in this function because I kept confusing myself as to what exactly I need to cleanup in this function and what was taken care of by the thread it spawns. The system as a whole that this code is part of is rather complex. This may be the single largest comment block I have ever written inside of a function.


/*
Load the specified plugin.

Remarks:
WARNING: This function has high overhead!

Arguments:
File [in] Name and path of the plugin to load.

Return Value:
If the plugin was loaded the identification number of the thread will be returned.
If the plugin path is invalid or the plugin has already been loaded 0 will be returned.
*/
unsigned long PluginManager::LoadPlugin( const char * File )
{
if( File == NULL ) return 0;
if( this->IsPluginLoaded( File ) == true ) return 0;
this->Plugins.push_back( PluginThread() );
this->Plugins.back().File = File;
this->Plugins.back().Provider = new EVPlugin( this->ProviderBase, 0, this->ED, this->Tabs );
this->Plugins.back().Provider->InfoMsg() << "Loading plugin " << File << std::endl;
// Before we actually create the thread, here is a short analysis of how the members of this->Plugins.back() are used.
//
// File File name and path of the plugin to load.
// This is also used by us as a sentinel to tell when the thread is finished initializing.
// Since the file name is no longer needed after the plugin is loaded (and it is not guaranteed
// to be initialized after this function exits), NULL is used as the sentinel value.
//
// Provider The plugin service provider handle that allows the plugin to interface with Alekto.
// It must be initialized in this function because only PluginManager can access the base.
// However, it does not need to be deleted anywhere in this class.
// Since it is used by the plugin thread exclusively, it will be deleted before the thread exits.
//
// Plugin The loaded plugin's handle.
// It is both created by and destroyed by the thread.
//
// Handle The handle of the plugin's thread.
// This handle must be assigned in this function when the thread is created.
// However, since it is no longer valid after the thread exits, the thread is responsible for nullifying it.
// This nullification is not done until the thread is ready to exit.
// Therefore, it may be safely used as a sentinel for thread exit.
this->Plugins.back().Handle = CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE) &PluginThreadProc, reinterpret_cast< void * >( &this->Plugins.back() ), 0, NULL );
while( this->Plugins.back().File != NULL ) Sleep( 1000 ); // Wait until the thread is done loading the plugin.
Sleep( 500 ); // Wait for another half-second, just to be sure the thread has had sufficient time to cleanup.
if( this->Plugins.back().Handle == NULL )
{
this->Plugins.pop_back();
return 0;
};
return EVPlugin::EncodeID( this->Plugins.back().Handle );
}
[/CODE]

  • 0

I have another example that may fit what you are talking about, albeit a bit on the extreme side. I created the rather large comment block in this function because I kept confusing myself as to what exactly I need to cleanup in this function and what was taken care of by the thread it spawns. The system as a whole that this code is part of is rather complex. This may be the single largest comment block I have ever written inside of a function.

FWIW, when I said "your" in that quote I was speaking generalities, it wasn't intended as a commentary on your commenting style :p

  • 0

People that say they don't comment because it's self evident are usually the ones who don't know what they're really doing and cause a massive headache for others once they are fired/leave and we're left with a jumbled mess of spaghetti code.

  • Like 2
  • 0

Well in .net I use the built-in XML style commenting system - a quick example:


/// <summary>
/// An example method to show 'Commenting Style'.
/// Performs no real functionality.
/// </summary>
/// <param name="FirstName">String - Input Persons Forename</param>
/// <param name="LastName">String - Input Persons Surname</param>
/// <param name="ID">Short Integer - Input Persons ID Number</param>
public void Example(string FirstName, string LastName, Int16 ID)
{
// Blah Blah Code Here
}
[/CODE]

  • 0

I comment more than I probably should, my code is clean and concise, but I like to outline my code in pseudo code before I write it, then I write the code to match the comments. So you could either read the comments to know what's happening, or read the code.

  • 0

I don't put comments in my code unless it's code I borrowed from some open source app, or something I got from a StackOverflow question. Then I will put what app it came from or the link to the SO question.

I also don't code for a living, nor do I do anything that is overly complex enough to actually require comments for someone to figure out what it does. I try to use function and variable names that would make it obvious to a reader what a particular block of code does. Same for class names.

  • 0

IMO I think you put in too many comments in. Code in my option should be simple and mostly self documenting. Keep It Simple and clean. Too much documentation can make it difficult to read actual code.

as some one said

I try to use function and variable names that would make it obvious to a reader what a particular block of code does. Same for class names.

return true; // Assume that everything ran successfully.

do you need to add that comment in ? ESPECIALLY when you have documented what it returns in the method header....

if you used a variable like 'hasRunSuccessfully' and then have 'return hasRunSuccessfully' it is essentially self documenting - no need for comments.

//

// Check for trouble.

//

check for 'trouble' not the best label - but programmers dont have to use the best labels, no need for the extra // just put in a blank line.

this->FoundFiles.clear(); // Clear our found files vector.

I would label this as FoundFileList or FoundFilesVector or FoundFileCollection and then if you have FoundFilesVector.Clear() it is pretty self evident what you are doing.

  • 0

IMO it boils down to adding relevant information where it's likely to help. There's no universal rule to determine what information is relevant and when it's likely to help. Rules like comment every function, or don't comment x or y, don't work. I am particularly vexed by any mandatory ASCII artwork like drawing boxes and lining up stars in front of every function. Complete waste of my time.

I think a combination of a clean, self-documenting coding style and unit testing goes a long way towards providing good understanding and confidence about a code base; unlike comments they can't lie and they can't go out of date unnoticed.

  • 0

I comment only where something is not clear and where the IDE makes use of them.

Our team follows the principals of self-explaniatory code. It's must easier to read a small function that does one thing with a set of self explanatory actions than a large function loaded with comments.

We'd probably write something closer to this for the example provided above:


unsigned long PluginManager::LoadPlugin( const char * fileName ) {

  if (!this-&gt;ShouldLoadPlugin( fileName ))
    return 0;

  PluginThread* pluginThread = this-&gt;CreatePluginThread( fileName );

  this-&gt;LoadPluginAndWait( pluginThread );

  return this-&gt;GetPluginResult( pluginThread );

}

  • Like 1
  • 0

By the way, the comments are the least of your worries about the last function you posted. In order of importance:

1)


while( this->Plugins.back().File != NULL ) Sleep( 1000 ); // Wait until the thread is done loading the plugin.
Sleep( 500 ); // Wait for another half-second, just to be sure the thread has had sufficient time to cleanup.[/CODE]

Waiting half a second doesn't guarantee any particular thread will run at all. This might come up 1 time out of 10000 in particular conditions which you might not even be able to reproduce. You should be using a proper thread synchronization mechanism such as a monitor here.

2)

[CODE] this->Plugins.back().Provider = new EVPlugin( this->ProviderBase, 0, this->ED, this->Tabs );[/CODE]

Any "new" operator in methods is a red flag. Exceptions can be thrown anywhere (including by the "new" operator itself) and prevent any cleanup code from executing, leading to memory leaks. Plus since there's no corresponding "delete" within the method, the cleanup responsibility is apparently held by some different code, which makes your memory management difficult to reason about (and probably wrong). The only way to guarantee proper cleanup in C++ is RAII, use it.

3) Some stylistic issues:

- Inconsistent use of C/C++-style casts:

[CODE]CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE) &PluginThreadProc, reinterpret_cast< void * >( &this->Plugins.back() ), 0, NULL );[/CODE]

- Using "this->" in front of every member access is just syntactic noise.

- If you're using a recent C++ compiler (VS2010 and above), use nullptr instead of NULL. nullptr is a pointer type, NULL is an integral constant. Consider:

[CODE]
void foo(int*);
void foo (int);

void bar() {
foo (NULL); // Calls 'foo(int)'
}[/CODE]

  • 0

By the way, the comments are the least of your worries about the last function you posted. In order of importance:

1)


while( this->Plugins.back().File != NULL ) Sleep( 1000 ); // Wait until the thread is done loading the plugin.
Sleep( 500 ); // Wait for another half-second, just to be sure the thread has had sufficient time to cleanup.[/CODE]

Waiting half a second doesn't guarantee any particular thread will run at all. This might come up 1 time out of 10000 in particular conditions which you might not even be able to reproduce. You should be using a proper thread synchronization mechanism such as a monitor here.

2)

[CODE] this->Plugins.back().Provider = new EVPlugin( this->ProviderBase, 0, this->ED, this->Tabs );[/CODE]

Any "new" operator in methods is a red flag. Exceptions can be thrown anywhere (including by the "new" operator itself) and prevent any cleanup code from executing, leading to memory leaks. Plus since there's no corresponding "delete" within the method, the cleanup responsibility is apparently held by some different code, which makes your memory management difficult to reason about (and probably wrong). The only way to guarantee proper cleanup in C++ is RAII, use it.

3) Some stylistic issues:

- Inconsistent use of C/C++-style casts:

[CODE]CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE) &PluginThreadProc, reinterpret_cast< void * >( &this->Plugins.back() ), 0, NULL );[/CODE]

- Using "this->" in front of every member access is just syntactic noise.

- If you're using a recent C++ compiler (VS2010 and above), use nullptr instead of NULL. nullptr is a pointer type, NULL is an integral constant. Consider:

[CODE]
void foo(int*);
void foo (int);

void bar() {
foo (NULL); // Calls 'foo(int)'
}[/CODE]

I really appreciate your feedback. Especially RAII, which I didn't know about before.

I do have one question though. I am using GCC 4.6.2 to compile the project the code excerpt you quoted in point 3 came from, so it does have (mostly complete) C++11 support and I can use nullptr. With the size of this project, however, it would take considerable effort to convert all of my null pointers to nullptr instead of NULL. What is the advantage of doing so?

  • 0

I do have one question though. I am using GCC 4.6.2 to compile the project the code excerpt you quoted in point 3 came from, so it does have (mostly complete) C++11 support and I can use nullptr. With the size of this project, however, it would take considerable effort to convert all of my null pointers to nullptr instead of NULL. What is the advantage of doing so?

You could just run find-and-replace over the entire project, if you're feeling bold. It should just work, in theory. The benefit of nullptr over NULL is in certain cases where there is ambiguity between integer and pointer type, where using NULL can result in unexpected bugs. nullptr is a proper pointer type unlike NULL, so it behaves as expected.
  • 0

I try to comment whenever possible in my code, block comments above classes / methods and small lines for clarification where it may be needed.

I find this method makes it easier when you get stuck, and helps identify logic errors more easily. Not only does it help to maintain the code but it helps me think through a de-bugging process.

If I know somebody else will be reading / maintaining / using my code I make sure I have legible nearly organised comments.

This topic is now closed to further replies.
  • Posts

    • Well I really think the repasting helped if your higher clocks have returned, maybe the next thing to look at is if there is a problem with your case airflow? I guess this because your 3080 has returned to optimal state, but is still staying too warm, which might suggest it was thermal throttling before you repasted, of which the only logical conclusion could be outside factors.
    • Samsung Galaxy Z Fold 8, Flip 8, Z Fold Wide: Everything you need to know by Hamid Ganji Galaxy Z Fold 7 - Image via Samsung The next generation of Samsung foldables is set to be unveiled next month at the second Unpacked event of the year. Samsung’s 2026 foldables are not expected to offer significant upgrades over their predecessors, with the Korean firm instead focusing on design refinements and conventional upgrades such as faster processors and better cameras. However, Samsung is reportedly planning to unveil an all-new passport-style foldable this year to rival Apple’s first foldable iPhone, which is expected to debut this September. Here’s a roundup of everything we know about Samsung’s upcoming foldable devices ahead of their official debut. When can we expect Samsung’s new foldables? The Galaxy Z Fold 7 and Z Flip 7 series were unveiled in July, and Samsung is expected to maintain this timeframe in 2026. Based on previous reports from Korean sources, Samsung will hold its Unpacked event on July 22 in London, UK, to pull back the curtain on the Galaxy Z Fold 8 series. The devices are also expected to hit the shelves a few weeks after launch. However, Samsung has yet to announce an official date. A new naming scheme? One of the most interesting changes we might see this year is a new naming scheme for Samsung’s latest foldables. SamMobile reported that since Samsung is expected to unveil three foldables this year, it has adopted a new naming strategy to simplify product identification for customers. Accordingly, the standard Galaxy Z Fold 8 will reportedly be called the Galaxy Z Fold 8 Ultra and will serve as the direct successor to last year’s Galaxy Z Fold 7. The “Ultra” suffix suggests the phone could feature higher-end specifications, such as additional rear camera modules. Samsung’s new passport-style foldable is expected to carry the Galaxy Z Fold 8 name without any suffix. This model is reportedly equipped with two rear cameras. No major changes are expected for the Flip model. Galaxy Z Fold 8 Ultra and Z Flip 8 anticipated specs Rumors over the past few months suggest Samsung is preparing several upgrades for its upcoming foldables, although the devices may continue to rely on larger batteries and faster charging speeds rather than dramatic design changes. The primary focus this year is expected to be the Galaxy Z Fold 8 and its wide-screen design. Galaxy Z Fold 8 Ultra official CAD renders - Image via AndroidHeadlines Here are the anticipated specifications for the Galaxy Z Fold 8 Ultra based on previous leaks: 6.5-inch outer display and 8-inch inner display, 120Hz refresh rate, and 2,600 nits peak brightness Snapdragon 8 Elite Gen 5 processor, paired with 12GB or 16GB of RAM and 256GB, 512GB, or 1TB of storage 4.1mm thickness when unfolded and a weight of 210g 200MP main camera, 50MP ultrawide camera, 10MP or 12MP telephoto camera, 10MP cover camera, and 10MP selfie camera 5,000mAh battery with 45W wired charging Android 17 and One UI 9 As for the Galaxy Z Flip 8, the device is not expected to be a major departure from its predecessor, although it could become slightly slimmer. Expected specifications include: Snapdragon 8 Elite Gen 5 or Exynos 2600 processor 12GB of RAM with 256GB and 512GB storage options 6.9-inch Dynamic AMOLED 2X inner dispaly and 4.1-inch Super AMOLED outer dispaly 50MP main camera, 12MP ultrawide camera, and 10MP selfie camera 4,300mAh battery with 25W wired charging Android 17 and One UI 9 Samsung’s foldables are also expected to launch with Gemini Intelligence, Google’s AI suite for automating tasks in Android ecosystem. Moreover, given current memory and component costs, some Galaxy Z Fold 8 Ultra and Z Flip 8 variants could see a price hike. Galaxy Z Fold 8 adopts a wide-screen design The centerpiece of the upcoming Unpacked event could be the Galaxy Z Fold 8, previously rumored as the Galaxy Z Fold Wide. This model adopts a passport-style form factor and is expected to compete directly with Apple’s iPhone Fold. Galaxy Z Fold 8 official CAD renders - Image via AndroidHeadlines Here’s what to expect: 7.6-inch primary OLED display and 5.4-inch cover display, 120Hz refresh rate, 2,600 nits peak brightness, and 4:3 aspect ratio Snapdragon 8 Elite Gen 5 processor, 12GB or 16GB of RAM, and 256GB, 512GB, or 1TB storage options 4,800mAh battery with 45W wired charging 50MP main camera, 50MP ultrawide camera, and 10MP selfie camera Android 17 and One UI 9 The three new foldable phones are unlikely to be the only devices unveiled at Samsung’s Unpacked event. The company is also expected to introduce the Galaxy Watch Ultra 2 and the Galaxy Watch 9 series.
    • Thanks
    • 7 Days: Killing uBlock Origin bypasses, Euro Office faces fire, and will AI replace you? by Aditya Tiwari 7 Days is a weekly roundup of picks of what's been happening in the world of technology - written with a dash of humor, a hint of exasperation, and an endless supply of (black) coffee. This week's highlights include WWDC 2026 announcements, updates on child safety, and Meta's use of data from outside businesses to optimize your feed. Let's get started. You can check out the recent issues of the 7 Days weekly roundup. Killing uBlock Origin bypasses The hottest news of the week was about Google Chrome effectively ending most uBlock Origin workarounds (a free, open-source ad blocker extension) by permanently dropping MV2 extensions and their bypasses. Chrome is transitioning towards newer MV3 extensions. A recent discussion thread highlighted how the latest and upcoming versions of the most popular browser are expected to be its final releases with support for MV2 extensions. Genuinely European? Euro-Office faces fire The recently launched cloud-based office suite, Euro-Office, is facing criticism at home. The LibreOffice developer wrote an open letter criticizing Euro-Office for its marketing claim that it's the "first open-source office suite developed in Europe," since the honor has belonged to OpenOffice since 2001. The Document Foundation has called out Euro-Office, arguing that it can't consider "itself genuinely European" as long as it keeps pushing Microsoft defaults on users, adding that "it has to speak ODF as its mother tongue." Will AI replace you? Image: Tara Winstead via Pexels Microsoft's AI boss, Mustafa Suleyman, said in an interview earlier this year that AI would replace office workers within 12 to 18 months. Joining the ranks of top executives who have softened their stance on AI replacing humans, Suleyman recently walked back his earlier remarks and now says that AI will automate tasks, not replace entire white-collar jobs. He defended his earlier comments by arguing that they referred only to individual actions people perform at their desks. Louis Rossmann wants to sue Samsung Image: Louis Rossmann Tech repair entrepreneur and right-to-repair activist Louis Rossmann contacted Samsung support over a failed 4TB Samsung 990 Pro NVMe SSD. After back-and-forth communication, Samsung offered a $330 refund instead of a replacement, but Rossmann found that the SSD was readily available for new buyers at a higher price. He has issued a formal 60-day notice and intends to file a suit in Texas small claims court, as Samsung's actions reflect a failure to honor its warranty obligations. Samsung reached out to Neowin to clarify its updated stance that customers in such situations will receive a refund equal to the product's current market price. Child safety or mass surveillance? Image: Jonathan Borba via Pexels Signal accused the UK government of using child safety and device-level explicit content ban as a cover for mass surveillance. Calling the plan "dystopian," Signal warned that it violates everyone's fundamental right to privacy. The messaging platform believes that the government should keep children "safe" and "protected," but it should do so through social services and education. Fears of social media regulation Image via DepositPhotos.com More governments across the globe are tightening their grip on social media and bringing stricter regulations in the name of child safety. Bluesky COO, Rose Wang, warned that social media regulations could destroy competition from small startups and that heavy regulatory compliance costs favor deep-pocketed tech giants while locking out new entrants. Our Features Image: Pexels Our coffee-powered team publishes a platter of editorials, opinion posts, and guides. Here's what they got for the week: UK **** blockers are a looming privacy disaster, we must be able to see the source code This week in software news Image: Proton Catch up on some of the latest software news updates that arrived throughout the week: Dark clouds over PC makers: Building on our report from last month, Dell officially acknowledged that its own remediation software was causing BSOD issues and unexpected system restarts. HP is also facing equally frustrating issues involving recent Windows Secure Boot updates on Windows 11. Controversial icon: Spotify finally removed the disco ball icon from its app and replaced it with the familiar flat green logo after weeks of mixed reactions online. While some people don't like the new design, the retro, three-dimensional look has generated a following of its own. Even other brands are coming up with their versions of the disco logo. NVIDIA fixes stuff: A new hotfix driver 610.52 fixes various issues related to monitors and displays, noting that G-SYNC-related frame pacing troubles should now be resolved on Ada Lovelace GPUs. The feedback thread also points out that the hotfix patches a BSOD issue. FIFA World Cup tracker: Opera is redesigning its Android browser with a built-in football tracker for the upcoming World Cup in the US. The new homepage is now "more immersive" with easier access to common browser features. Command line for Proton: The Swiss technology company has launched a command line version of the Proton Drive, which you can use to manage your encrypted files directly from a terminal across all major platforms, including Windows, macOS, and Linux. This week in hardware news Image: Thermaltake Catch up on some of the latest software news updates that arrived throughout the week: Intel and AMD PCs in one case: Thermaltake's CAPO X dual-system chassis brings you the best of both worlds by supporting two microATX (mATX) motherboards and up to two 360 mm AIO liquid coolers. If you want ideas, maybe you can use one as your main PC and another as an AI agent. Google Tensor production: While TSMC will remain the lead producer, the search giant is reportedly in talks with Samsung to hand over part of the production of its next-generation Tensor AI chips. The upcoming TPUs are reportedly codenamed “Icefish” and will be produced using Samsung's 2-nanometer process technology. Lethal fake phone chargers: UK-based consumer rights organization Which? has warned that "potentially lethal knock-off chargers" are still being sold on online marketplaces, including Amazon and eBay, despite the dangers of such chargers having been exposed. This week in Google News Image: Google Catch up on some of the latest Google news updates that arrived throughout the week: Sliding into DMs: You might remember that YouTube had a direct messaging feature back in the day. It's now rolling out a revamped direct messaging inbox that lets you share Shorts, videos, and live streams and have conversations about them. New in NotebookLM: The AI-powered note-taking app got some new agentic capabilities and more advanced reasoning, thanks to support for Gemini 3.5 and Antigravity. NotebookLM can now generate outputs in more formats, making it easier to start new projects with less information. This week in Apple News Image: Apple Catch up on some of the latest Apple news updates that arrived throughout the week: WWDC 2026: This week was all about Apple's annual developer conference, where the iPhone-maker finally unveiled an upgraded Siri AI and a platter of new Apple Intelligence features. Siri AI now has a cross-platform app, which is supported on select models of iPhone, iPad, Mac, Apple Watch, and Vision Pro. What's different about WWDC: I wrote a detailed feature this week discussing how Apple changed the WWDC keynote this year, blurring the lines between its operating systems. Apple didn't have dedicated segments for its operating systems this year and didn't even publish the official press releases. Liquid Glass slider (finally): It's that time of the year when Apple previews fresh updates for iPhone, iPad, Mac, Apple Watch, AirPods, and other platforms. A new transparency slider for Liquid Glass is coming to iOS 27, iPadOS 27, and macOS 27 Golden Gate. Is your device supported?: If you're wondering whether your Apple device supports the new developer beta builds, you can check the respective compatibility lists for iOS 27, iPadOS 27, macOS 27, and watchOS 27. Siri AI not coming to Europe: Yes, that's true due to complications related to the Digital Markets Act (DMA). While Apple penned a blog post to tell its side of the story, a European Commission spokesperson told Neowin that the DMA does not prohibit Apple from launching its services in the EU; the company is simply required to comply with the law. New child safety features: Apple announced a trove of new safety features for kids, including a simpler setup experience for parents, Ask to Browse, Time Allowances, and a redesigned Screen Time UI. Parents can now visit a new website to find answers to common questions around child safety features. More cloud power: Apple's Private Cloud Compute cloud infrastructure will now run beyond its own data centers for the first time. It's working with Google and NVIDIA to run new Apple Intelligence workloads on Google Cloud systems powered by NVIDIA GPUs. This week in Meta news Catch up on the latest Meta news updates that arrived throughout the week: Data from outside: Meta is rolling out a new update globally to personalize your AI responses and primary feeds using data from outside businesses. It already targets ads based on shopping activity, but the latest development enables it to personalize other "parts of your experience." There is a toggle in the Settings to disable activity from other businesses; however, it won't prevent companies from sending your data to Meta. Level playing field: The European Commission has ordered the social media giant to restore access to WhatsApp for third-party AI chatbots, including ChatGPT and Copilot. Meta previously blocked rival AI chatbots from operating on WhatsApp, prompting the Commission to launch an antitrust investigation. Spying on users: On the flip side, WhatsApp accused the Israeli cyber-intelligence firm, NSO Group, of deploying a fresh wave of targeted "spear phishing" attacks against its users, which were thwarted by WhatsApp's security teams. Reorder profile grid: Adding some customization for the profile grid feature, Instagram now lets you rearrange posts in your profile without deleting and reuploading content. Go to your profile and long-press any thumbnail to find the "Reorder grid" option. This week in AI news Catch up on the latest artificial intelligence news updates that arrived throughout the week: Claude RAM hogger: Windows users are getting infuriated by Claude Desktop's hidden 1.8GB Hyper-V VM bug, which spins up if you use Claude Cowork or agent mode even once. It shows a Vmmem process in Task Manager, indicating 0% CPU usage but 1.8GB of RAM usage. Claude Fable 5: The new state-of-the-art AI model from Anthropic beats OpenAI's ChatGPT-5.5 in multiple AI benchmarks. Claude Fable 5 sits above the Opus models and outperforms most other generally available models across knowledge work, vision, scientific research, and more. However, the model was abruptly suspended after receiving an export control directive from the US government. Stack Overflow for AI agents: The popular Q&A platform has launched Stack Overflow for Agents in beta, which AI agents can use to share, find, and reuse coding knowledge. It explained that AI agents operate in isolation, creating an Ephemeral Intelligence Gap, and valuable tokens are wasted on something another agent has already solved. Upgrading Codex: OpenAI is buying a company called Ona, which makes secure cloud execution and orchestration technology for developers. The ChatGPT-maker aims to make Codex agents run for days without being tied to a local machine or an active session. It also announced a new developer mode in Chrome. This week in open-source news Catch up on some of the latest open-source and Linux updates that arrived throughout the week: Linux 7.1 rc7: Linux Torvalds dropped an optimized rc7 with crucial fixes for AMD and laptop hardware. He said that a stable version of Linux 7.1 could arrive next week, adding that the latest RC is not small, but smaller than recent releases. Alpine Linux 3.24: The latest Alpine Linux release added support for COSMIC Desktop, Linux 6.18, IPv6 installer support, automatic serial console configuration for headless setups, and major package updates and removals. This week in Microsoft News Microsoft had to shut down more than 70 GitHub repos after they were compromised by malware, Teams is getting a controversial tracking feature that users may hate, and the company explained why the new update makes PowerToys faster. You can check out Taras's freshly baked Microsoft Weekly roundup to catch up on all the interesting stories this week. This week in gaming The latest issue of Pulasthi's Weekend PC Game Deals curates several exciting games on sale this week. On the Epic Games Store, the new titles on display for grabs include Warhammer 40K Speed Freeks and The Ouroboros King. NVIDIA GeForce NOW's summer sale lowered the prices of both the Performance and Ultimate membership options for a limited time period. Meanwhile, the Xbox Free Play Days brought Undead Labs' post-apocalyptic title State of Decay 2, as well as two Team17-published titles. That said, here are some more stories from the gaming world: Dragon's Dogma 2: Dark Arisen expansion to bring snowy region, new updates also coming Playground drops 30 minutes of Fable gameplay, shows off life sim and morality system Playground Games confirms Forza Horizon 6 save wipe bug Doom: The Dark Ages Revelations expansion gives the Slayer a brutal Chain Spear State of Decay 3 is out in 2027, reveals Plague Nests with new co-op gameplay trailer From the review corner This week, Taras got his hands on the DuRoBo Krono portable e-ink reader, which comes with a $279 price tag. It's a smartphone-sized device with a rotating dial, sitting somewhere between premium and cheap in terms of build quality. Speaking of the pros, the physical controls are cool, the smart dial is useful, the battery life is good, and Android 15 has no-nonsense software. On the flip side, the device lacks software customization, the built-in AI needs improvement, the smart dial is a bit wobbly, and there is no ambient light sensor. EA Sports UFC 6 EA Sports UFC 6 does a better job at onboarding new players than most fighting games, according to Pulasthi's detailed review. The game comes with rewarding combat systems, top-notch animation, impressive impact physics, and visible damage on fighters. However, the menus lag a lot, grappling isn't very fun, and the flow state feels a little misplaced. More price drops! We got you covered with some hot tech deals all week. For some reason, if you missed out on a great discount, here is a summary of some recent deals that are still alive: GIGABYTE Radeon RX 9070 XT Gaming OC ICE 16G - $649.99 (13% off) 1TB Samsung T7 Portable SSD - $189.98 (31% off) AirPods Pro 3 - $179 ($50 off) Edifier R1280Ts Powered Bookshelf Speakers - $129.99 (24% off) To view all of our recent deals, click here. So, these were some of the biggest tech news and other updates from this week. There will be more issues of our 7 Days series in the coming weeks and months, so stay tuned. You can also support Neowin by registering for a free member account or subscribing to extra member benefits, along with an ad-free tier option. Have a great weekend!
  • Recent Achievements

    • Week One Done
      rolfus earned a badge
      Week One Done
    • One Month Later
      Leroy Jethro Gibbs earned a badge
      One Month Later
    • Conversation Starter
      flexorcist earned a badge
      Conversation Starter
    • One Month Later
      AndreaB earned a badge
      One Month Later
    • One Month Later
      agatameier earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      505
    2. 2
      +Edouard
      197
    3. 3
      PsYcHoKiLLa
      141
    4. 4
      ATLien_0
      90
    5. 5
      Steven P.
      81
  • Tell a friend

    Love Neowin? Tell a friend!