- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Admin
#define THOUSAND 978 /* has been shown to be sufficient in most cases for thousand */ #define THIRTY 30
Is the article-code C#? Java doesn't have a string, but a String, and final but const, but on the other hand - why not define you own - maybe mutable - string.class and why not use a preprocessor for your java-code.
private const string ClassTypeJ = "J" ; private const string ClassTypeU = "U" ; private const string ClassTypeS = "S" ; private const string ClassTypeT = "T" ; private const string ClassTypeA = "A" ; private const string ClassTypeC = "C" ; private const string ClassTypeO = "O" ; private const string ClassTypeM = "M" ; private const string ClassTypem = "m" ; private const string ClassTypeE = "E" ; private const string ClassTypeN = "N" ; private const string ClassTypet = "t" ;
And it's not the last word in mental illness, sagaciter!
Admin
Sensible use of defined constants:
Non-sensical use of defined constants
Admin
Your IDE can help refactor code where you use variables. It can not help where you use strings.
Oh I hear you saying, there's no need for fancy refactoring tools! It's just search and replace! Well, no. Not if you have two types that are coded by one-character strings. Say, FOO_A = "A", FOO_B = "B", BAR_A = "A", BAR_B = "B", etc. Then, you want to change all the foo "A"s to foo "B"s without affecting bar "B"s. Good luck if you're using string literals.
Just a couple of the many reasons to minimize inline string (and numeric) literals in code.
Admin
Please, avoid any job that has a remote connection to localization or international communications. Ä can only be represented as AE if the text you're handling is German or one of a few other languages; it's wrong if the text is Dutch or English or Estonian or Turkmen or Welsh or Sami. As usual, the German solution is given out like it's the universal right thing and anyone who thinks otherwise is parochial.
Admin
Admin
Here's a list of English words with Ä: http://en.wiktionary.org/wiki/Category:English_terms_spelled_with_%C3%84 Häagen-Dazs and doppelgänger would both produce unpleasant surprise if they were transliterated with ae. As for Estonian and Turkmen, Ie thıenk the prıencıeples of least surprıese dıescourage the ıensertıeon of random e's, no matter what other manglıeng ıes goıeng on.
Admin
Someone has way to much time on their hands.
Admin
This doesent make sense haha
Admin
So there you have the fundamental problem with automatic transliteration: it's extremely sensitive to the context. You can't even use a dictionary to figure out what to do, because a word may be valid in multiple languages, a text primarily written in one language might contain words or fragments from a different language, and foreign loan words that look familiar might be inflicted according to different rules (as is common in Dutch with verbs loaned from English, like "to upload" which also gets a ü in the perfect past tense, even though that character would not be used in English).
I'm afraid there there is no silver bullet for this problem. One solution is to just support foreign character sets, which can certainly be problematic in some cases, but if you want to transliterate to ASCII, you probably have to do it manually.
Admin
Eh, it's nearly a week later, but just want to $.02 that software for a train might be better having caught fat-fingering number values at compile-time rather than having anybody literally run into the results of fat-fingering a number.
Admin
...and yes, I failed to quote out of inexperience with the tdwtf interface. Was from the following (...and we'll see if quote blocks have to be at the beginning of a comment block):
Admin
Admin
I can't believe someone spent the time to translate it to russian but even more I can't believe i was able to read and understand it -its been 18 years since i last took russian in school.
Captcha: jugis - is what?
Admin
You're wrong.. You should use ClassTypeSpace, ClassTypeComma and ClassTypeExclamation :P
Admin
Таможенный импортер «ВЭД ЛАЙН» является внешнеэкономической компанией в сфере таможенных услуг и торговли с КНР, которая функционирует на рынке Владивостока. «ВЭД ЛАЙН» https://ved-line.ru предлагает своим контрагентам надежные услуги по мультимодальной перевозке грузов, таможенному оформлению также сертификации импортных товаров в таможенных органах. Декларанты компании «ВЭД ЛАЙН» предоставят консультационные услуги в сфере деятельности таможенного оформления, и в случае нужды представят интересы в пользу заказчика в суде.
Admin
Корабли транспортируют товары в разные части страны и в другие территории земли. Недостаток стойких внешнеполитических ситуаций во многих странах возникает затруднением по дороге фрахта, однако выгодное бизнес-партнерство дружеской азиатской страны со странами таможенного союза ЕАЭС остается крепким. Имеется потенциал заказывать дешево крупноразмерный товар, получив опытную консультацию на каждом пути. Из всех видов наибольшую дедвейт носит только судно. Водный транспорт https://ved-line.ru играет наивысшую роль в внешнеэкономической торговле любой страны. Морские расстояния - это подарок природы, и, поэтому, для их поддержания не требуется никаких вложений. Это превосходство превращает морские перевозки грузов из КНР успешными для обеих сторон. Денежные траты не выше в сопоставлении с другими видами перевозок. На морских путях нет сложностей с транспортными пробками. Это дает шанс миновать задержек, когда осуществляется отправка морским судном из Китая.