Jump to content

Wikipedia:Reference desk/Computing

From Wikipedia, the free encyclopedia
Welcome to the computing section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:


June 3

[edit]

Spellcheck dictionary in Duckduckgo

[edit]

I have recently swapped to Duckduckgo as my browser. It took me a while to get it to even run an automatic spellcheck on what I typed, and I'm not sure now how I achieved that. Now though I want to add words to the spellchecker's dictionary. How can I do that? HiLo48 (talk) 01:48, 3 June 2025 (UTC)[reply]

@HiLo48: Which spellchecker are you using? Duckmather (talk) 04:43, 3 June 2025 (UTC)[reply]
Duckmather I have no idea. How do I find out? (I haven't found the Settings part of Duckduckgo very friendly or intuitive at all.) HiLo48 (talk) 04:48, 3 June 2025 (UTC)[reply]
@HiLo48 You might do better to ask in a specialist forum, such as [1] Shantavira|feed me 17:02, 3 June 2025 (UTC)[reply]


June 6

[edit]
[edit]

Hi!

A few years ago, I tried to promote a YouTube video using its integration with Google Ads. However, a technical issue made that impossible. It was not possible to complete the process to the payment stage (page simply not loading or showing error messages).

I tried again a week ago, and on my second attempt, it worked. So now money is being taken from my credit card while the video is being promoted.

However, in the Google Ads web UI I cannot see the active campaign. I can see all my account details, the billing data, but no active campaign.

I do get a lot of email messages from Google Ads suggesting that I fine tune my campaign, but when I click the links in the message, I am met with a page telling me that I have no campaigns.

Interestingly, if I search for "Google Ads" in Google, I see a summary of my campaign at the top, before any WWW search results. But when I click a link there, I am taken to a Google Ads page telling me that "an error occurred".

I have been in contact with Google Ads support, and they tell me repeatedly that there is no technical issue, but that I am confusing the "Overview" page with the "Campaigns" page, even though I have even sent them a video showing me trying multiple times to access any information on the Campaigns page.

Is this just me being stupid?

Here's a video of me trying:

https://privat.rejbrand.se/GoogleAds-bug-demo-hb.mp4

Any other Google Ads user out there that can confirm my stupidity or the presence of a technical issue?

--Andreas Rejbrand (talk) 16:36, 6 June 2025 (UTC)[reply]

I can confirm that you have not made any mistake, and Google customer support is being terrible and ignoring what you say, per their usual business strategy. You must search for information unassisted. The word "showing" seems to be a poor search term because hundreds of sites want to answer the question "why aren't my ads showing up?", so a narrower search is necessary. Searching support.google.com for a thread with a topic like "Campaigns not listed" may be informative.  Card Zero  (talk) 18:09, 6 June 2025 (UTC)[reply]
Thank you, I'm glad to hear that I wasn't missing something obvious. --Andreas Rejbrand (talk) 19:29, 6 June 2025 (UTC)[reply]
FWIW, here's Google's latest reply:
Hi Andrea [sic],
Thank you for your prompt response.
Information:
As we've mentioned, please remember to view your campaigns under the "Campaigns" section, not "Overview." The interface is working correctly. And we can see your campaign has also ended. It's simply a matter of selecting the right navigation. For more clarity, please provide your phone number so we can call you and walk you through it.
Thank you for your cooperation.
Sincerely,
NN
--Andreas Rejbrand (talk) 10:17, 9 June 2025 (UTC)[reply]
It's true that the campaign has ended by now; I was not able to extend it due to the campaign not being shown in the UI me not understanding the GUI.
I wonder if past campaigns should be listed in the UI? If so, I'd love to have NN instruct me in real time on how to see it in a desktop-sharing Teams meeting.
Then NN can try themself to display the campaign. I mean, "[i]t's simply a matter of selecting the right navigation". -Andreas Rejbrand (talk) 10:17, 9 June 2025 (UTC)[reply]


June 8

[edit]

Downgrading Mobile (cellular) Phone

[edit]

The 5G service where I'm now living is almost nonexistent, and I'm wondering whether I can switch to using 4G. I'm using an iPhone 5s as I can't afford a newer one.

Various sources tell me to go to the Cellular or Network menu under Settings, but those don't appear to exist! Would I have to get a different SIMM? Rojomoke (talk) 10:10, 8 June 2025 (UTC)[reply]

The iPhone 5s is not 5G capable in the first place, so there is nothing to switch. See the "compatible networks" in iPhone 5s or Apple's Technical Specifications page for example. Alpha3031 (tc) 10:56, 8 June 2025 (UTC)[reply]
Ah, thanks Alpha3031, I hadn't seen that.
In that case, can anyone suggest why I'm seeing a very weak, sometimes non-existent signal, when ee says there's good coverage here? Rojomoke (talk) 17:38, 8 June 2025 (UTC)[reply]
Lies and illusions? Or low resolution in EE's coverage report? You might try going for a little circular walk and see if signal strength improves anywhere nearby.  Card Zero  (talk) 18:08, 8 June 2025 (UTC)[reply]
I would contact ee about it, as they should have internal tools that tell them which tower you're expected to connect to at your address (and which you actually do connect to) what frequencies that tower specifically uses, and what signal level (RSRP/RSRQ) you're actually expected to receive, in a bit more detail than they'd put in public facing maps. Whether or not they're allowed by policy to explicitly tell you the actual numbers, you might be able to tell whether they think they'd be able to fix it or not, and if not you can explore other options. Alpha3031 (tc) 04:42, 9 June 2025 (UTC)[reply]
FWIW 5G-equipped phones can use 4G and LTE networks anyways.
On Apple's guides e.g. View or change cellular data settings on iPhone, you can click the "Select version" switcher at the top to go to the version of the page for your iOS version. The last iOS version for 5s was 12, so I guess that's what you need: https://support.apple.com/en-au/guide/iphone/iph3dd5f213/12.0/ios/12.0 Aaron Liu (talk) 22:29, 8 June 2025 (UTC)[reply]


June 11

[edit]

C# style question

[edit]

I know today that "if" and "else" are considered harmful, but I'd still like to ask which of the following constructs is better:

Method 1:

if (type == Types.TypeA && ProcessTypeA)
{
    DoProcess1();
}
if (type != Types.TypeA && ProcessOtherTypes)
{
    DoProcess2();
}

Method 2:

if (type == Types.TypeA)
{
    if (ProcessTypeA)
    {
        DoProcess1();
    }
}
else if (ProcessOtherTypes)
{
    DoProcess2();
}

Of course, any alternative suggestions would be welcome. 194.73.48.66 (talk) 10:55, 11 June 2025 (UTC)[reply]

Method 1 is neat, businesslike and rational. It assumes that the second conditional branch will be eliminated by the compiler to produce the structure of method 2 anyway. It further assumes that saving an if statement here and there is unimportant. Method 2 represents the forlorn hope that C# might allow the programmer control over the machine code that will ultimately be created, and it harks back to the 1980s when program optimization mattered even outside of bottlenecks. I'd choose method 2. Who are you writing the code for? Is it important that other people like it?  Card Zero  (talk) 12:35, 11 June 2025 (UTC)[reply]
What do you mean "if and else are considered harmful"?
I would definitely feel like method 2 is better. Aaron Liu (talk) 13:29, 11 June 2025 (UTC)[reply]
I presume the perceived harmfulness is related to the effect of conditional branches on instruction pipelining. On a pipelined architecture, if efficiency is your highest concern, then yes, there's some incentive to avoid if statements. Most of the time, of course, efficiency is not (or should not be) the highest concern, so a blanket notion like "if considered harmful" is an extreme and dangerous overreaction. (But given the overweening concern many programmers have about maximizing efficiency at all costs, I guess I can't be too surprised.) —scs (talk) 10:56, 12 June 2025 (UTC)[reply]
Number 2 is better as it is easier to understand. Please also consider the other 2 condition combinations that do nothing, was that intended? Graeme Bartlett (talk) 23:02, 11 June 2025 (UTC)[reply]
What is easy to understand is somewhat personal, I guess, because to me the following seems more understandable than method 2:
if (ProcessTypeA)
{
    if (type == Types.TypeA)
    {
        DoProcess1();
    }
}
if (ProcessOtherTypes)
{
    if (type != Types.TypeA)
    {
        DoProcess2();
    }
}
 ​‑‑Lambiam 01:33, 12 June 2025 (UTC)[reply]
There are some automated code review tools (such as SonarQube) that have implemented many rules for what is considered good code while at the same time grading code structure on complexity. Unfortunately, some organizations have treated these rules as gospel to be blindly followed. This approach prioritizes rule following ahead of code readability and maintainability, and can result in the combining or refactoring of logic to satisfy some artificial metric instead of writing code that naturally follows the intended thought processes. While code review tools can be quite helpful, they are just tools.
In the end, you should write code that clearly reflects the intended logic, can be easily understood by programmers down the road (possibly your future self), and can be modified and enhanced in a straightforward manner. Don't go down the path that produces convoluted code that uses one less (evil) if statement. -- Tom N talk/contrib 02:26, 12 June 2025 (UTC)[reply]
It seems that version 2 is somehow more convoluted and less complex, at the same time.  Card Zero  (talk) 10:13, 12 June 2025 (UTC)[reply]
I'd say there are two opposing concerns here:
  1. else and else if are good: if you have two adjacent if statements, as in method 1, the reader has to do extra work to convince themselves that at most one of the two will be taken, that there's no circumstance under which both might be taken.
  2. nested if statements can be confusing, especially when they lead to the phenomenon of a "bushy" if/else tree. I wouldn't say that method 2 is particularly bushy or confusing in that regard, but it's on its way.
In a case like this, if what you care most about is readability, I find it can help to use an else, along with a repeated test (which ends up being a lot like method 1):
if (type == Types.TypeA && ProcessTypeA)
    DoProcess1();
else if (type != Types.TypeA && ProcessOtherTypes)
    DoProcess2();
Now there's no nesting, and it's maximally clear that the two cases are exclusive, that typeA things will be processed only if the ProcessTypeA flag is true, and that non-typeA things will be processed only if ProcessOtherTypes is true.
The drawback to this arrangement, of course, is that you'll probably get complaints that the repeated test is somehow "wasteful" or "inefficient". And, yes, it may be, but: so what? There's nothing wrong with caring about readability, and the resource that's allegedly being "wasted" here is... what? —scs (talk) 11:21, 12 June 2025 (UTC)[reply]
It is (at least to me) not entirely obvious that the (unspecified) problem requires the two cases to be exclusive. There is a general pattern of the type
if (<Process A is available> && <item can benefit from Process A>)
{
    <apply Process A>;
}
if (<Process B is available> && <item can benefit from Process B>))
{
    <apply Process B>;
}
if (<Process C is available> && <item can benefit from Process C>
{
    <apply Process C>;
}
Several processes may be applicable to a given item.  ​‑‑Lambiam 10:49, 13 June 2025 (UTC)[reply]
The other concern is how likely it is that the types and/or the exclusions will evolve over time. Today there are evidently just flags for ProcessTypeA and ProcessOtherTypes. If that's likely to change, it might be preferable to write
if(type == Types.TypeA)
    { if(ProcessTypeA) { DoProcess1(); } }
else
    { if(ProcessOtherTypes) { DoProcess2(); } }
This adds back the nesting, but makes it so that when a later programmer comes along to add special-purpose handling for TypeB, they'll have an easier time of it. —scs (talk) 14:10, 13 June 2025 (UTC)[reply]
Just to clarify, originally there was just one flag and one processing operation, and my task was to introduce a separate flag and processing function specifically for TypeA. If this happens again with one of the other types, Lambian's approach above should work. 194.73.48.66 (talk) 16:56, 13 June 2025 (UTC)[reply]

Thanks to everyone for your advice. The conclusion of the above discussion seems to be "Method 1 looks better, but I'd use Method 2", and @Lambian:'s method is a good compromise between them. I've run it past the various people who need to sign this off, and it's acceptable. 194.73.48.66 (talk) 15:30, 12 June 2025 (UTC)[reply]

I like Steve Summit's idea best now (the one from 11:21, 12 June 2025), but so long as you're a happy customer ...  Card Zero  (talk) 18:19, 12 June 2025 (UTC)[reply]

June 12

[edit]

Ability to “sync further” from iPad after I sync from iCloud

[edit]

I just lost my iPhone. I’ve ordered a new one which has just arrived.

Unfortunately, iCloud stopped syncing maybe a year and a half ago (I never paid for the upgrade once I reach the data limit).

I also have an iPad that was syncing with my lost iPhone, and so is much more up-to-date than the iCloud will be. But of course, an iPad doesn’t have all the same features as an iphone,

Given this, I was thinking that I would first sync my new iPhone from iCloud, to achieve I guess the state it was in a year and a half ago.

Once I’m done with that. I was hoping to “sync further” from the iPad—-in an attempt to make my new iphone as close as possible with the state my lost phone was in.

However, I have no idea how this can be done. Once I finish syncing with iCloud, how would I go about then syncing further from my iPad? Can anyone give me some guidance on this? Thanks— 2600:4040:9103:5000:7525:BC03:25D0:5326 (talk) 02:41, 12 June 2025 (UTC)[reply]

Just sync from the last backup your phone and then sync the items you want from iPad without pulling the iPad's backup, if any. Only the synced items would be overwritten. Aaron Liu (talk) 12:31, 12 June 2025 (UTC)[reply]


June 14

[edit]