• Vladimir (unregistered) in reply to alegr
    alegr:
    Vladimir:
    Генерация кода может быть эффективным инструментом для сильно вводе пользовательских доменов, если данный домен ограничена определенным набором ценностей. Приемлемые примеров можно назвать имена цветов, статусов, и штаты США, среди ряда других.

    В некоторых случаях это полностью избыточными для этого, например, если вы сильно набрав алфавиту:

    ClassTypeLetters общественного класса ( частных пд ClassTypeA = ""; частных пд ClassTypeB = "B"; частных пд ClassTypeC = "C"; частных строку сопзЬ ClassTypeD = "D"; частных ClassTypeE строку сопзЬ = "E"; частных пд ClassTypeF = "F"; частных ClassTypeG строку сопзЬ = "G"; / / H-W ... частных пд ClassTypeX = "X"; частных ClassTypeY строку сопзЬ = "Y"; частных пд ClassTypeZ = "Z"; )

    Machine translation fail.

    Настоящие программисты не используют Prompt!

    Эй, это то, что Google перевод мне дали.

  • user unknown (unregistered)

    #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!

  • Jay (unregistered) in reply to mike
    mike:
    If you think this is a WTF, your code is probably strewn with string literals, and because of this, bug-ridden.

    These are apparently business objects that happen to 1 character in length. Would you use string literals everywhere if the strings were 2 characters long? What about 5? Why is it different because they are 1 character long?

    Sensible use of defined constants:

    class TransactionType
    {
      public static final String SALE="S",
        RETURN="R", 
        EXCHANGE="X",
        INVENTORY_ADJUSTMENT="A",
      ... etc ...
    }
    

    Non-sensical use of defined constants

    class Codes
    {
      public static final String CODE_S="S",
        CODE_R="R",
        CODE_X="X",
        CODE_A="A",
        ... etc.
    }
    
  • mike (unregistered) in reply to Jay
    Jay:
    mike:
    If you think this is a WTF, your code is probably strewn with string literals, and because of this, bug-ridden.

    These are apparently business objects that happen to 1 character in length. Would you use string literals everywhere if the strings were 2 characters long? What about 5? Why is it different because they are 1 character long?

    Sensible use of defined constants:

    class TransactionType
    {
      public static final String SALE="S",
        RETURN="R", 
        EXCHANGE="X",
        INVENTORY_ADJUSTMENT="A",
      ... etc ...
    }
    

    Non-sensical use of defined constants

    class Codes
    {
      public static final String CODE_S="S",
        CODE_R="R",
        CODE_X="X",
        CODE_A="A",
        ... etc.
    }
    
    1. Your IDE can help refactor code where you use variables. It can not help where you use strings.

    2. 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.

  • Prosfilaes (unregistered) in reply to getofmymetriclawn
    getofmymetriclawn:
    If you really have to use 7-bit ASCII, Ä and Æ can be represented as AE. Not that there is a good reason for using anything other than a proper unicode encoding like UTF-8 anyways.

    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.

  • fnord (unregistered) in reply to Prosfilaes
    Prosfilaes:
    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.
    Dutch or English do not even have "Ä" as a letter, so there is no need to represent it at all. In other languages like Estonian or Turkmen, where Ä cannot be represented as AE, it can ALSO not be represented by A, so if you have no access to a character for Ä you are simply out of luck. (Fun fact about ä in Estonian: While it officially can not be represented as AE, it is, in fact, pronounced as /æ/)
  • Prosfilaes (unregistered) in reply to fnord
    fnord:
    Prosfilaes:
    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.
    Dutch or English do not even have "Ä" as a letter, so there is no need to represent it at all. In other languages like Estonian or Turkmen, where Ä cannot be represented as AE, it can ALSO not be represented by A, so if you have no access to a character for Ä you are simply out of luck.

    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.

  • Crypto (unregistered) in reply to Knux2

    Someone has way to much time on their hands.

  • Holden McGroin (unregistered)

    This doesent make sense haha

  • Maks Verver (unregistered) in reply to fnord
    fnord:
    Dutch or English do not even have "Ä" as a letter, so there is no need to represent it at all.
    Dutch certainly uses ä in a bunch of words of foreign origin such as Kanaän or knäckebröd. But the problem is much bigger for ö, ü and ï which not only occur in real words (coöperatie, vacuüm, reünie, penguïn, mozaïek) but can also be introduced in the perfect past tense of any verb starting with i, e or u (geïsoleerd, geüniformeerd, ingeënt). In none of these cases it would be correct to apply the German spelling rule of replacing ü with ue or ö with oe (and I don't even know if there is a rule for handling ë). It would be better (but not ideal) to just drop the diacritical mark and in some cases insert a hyphen.

    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.

  • frinetik (unregistered) in reply to Salvatore

    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.

  • frinetik (unregistered) in reply to frinetik
    frinetik:
    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.

    ...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):

    Salvatore:
    Lucky you it was "college code"

    I saw the following C defines in code at WORK, that runs on a embedded system which manage the communication module of a TRAIN.

    #define THOUSAND 1000 #define THIRTY 30

    and a few others.

    I'm not kidding.

  • getofmymetriclawn (unregistered) in reply to Prosfilaes
    Prosfilaes:
    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.
    Which are (with few exceptions) german words.
    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.
    Well, but deleting rndom prts of the words is not better.
    Maks Verver:
    Dutch certainly uses ä in a bunch of words of foreign origin such as Kanaän or knäckebröd. But the problem is much bigger for ö, ü and ï which not only occur in real words (coöperatie, vacuüm, reünie, penguïn, mozaïek) but can also be introduced in the perfect past tense of any verb starting with i, e or u (geïsoleerd, geüniformeerd, ingeënt). In none of these cases it would be correct to apply the German spelling rule of replacing ü with ue or ö with oe (and I don't even know if there is a rule for handling ë). It would be better (but not ideal) to just drop the diacritical mark and in some cases insert a hyphen.
    These are not "Umlauts" but "Trema" (except in Knäckebröd.) They have a very different meaning, even though they look identical. They even do/did exist in German, but their use in German is strongly disencouraged because they are usually mistaken for an umlaut.
  • Esk (unregistered) in reply to ubersoldat
    ubersoldat:
    Vladimir:
    Генерация кода может быть эффективным инструментом для сильно вводе пользовательских доменов, если данный домен ограничена определенным набором ценностей. Приемлемые примеров можно назвать имена цветов, статусов, и штаты США, среди ряда других.

    В некоторых случаях это полностью избыточными для этого, например, если вы сильно набрав алфавиту:

    ClassTypeLetters общественного класса ( частных пд ClassTypeA = ""; частных пд ClassTypeB = "B"; частных пд ClassTypeC = "C"; частных строку сопзЬ ClassTypeD = "D"; частных ClassTypeE строку сопзЬ = "E"; частных пд ClassTypeF = "F"; частных ClassTypeG строку сопзЬ = "G"; / / H-W ... частных пд ClassTypeX = "X"; частных ClassTypeY строку сопзЬ = "Y"; частных пд ClassTypeZ = "Z"; )

    I couldn't said it better.

    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?

  • ABCD9876 (unregistered) in reply to Knux2
    Knux2:
    (Java)
    System.out.println(ClassTypeW + ClassTypeO + ClassTypeW 
      + ", " + ClassTypei + ClassTypet + " " + ClassTypes
      + ClassTypeu + ClassTyper + ClassTypee + " " + ClassTypet
      + ClassTypea + ClassTypek + ClassTypee + ClassTypes + " "
      + ClassTypea + " " + ClassTypel + ClassTypeo + ClassTypen
      + ClassTypeg + " " + ClassTypet + ClassTypei + ClassTypem
      + ClassTypee + " " + ClassTypet + ClassTypeo + " "
      + ClassTypet + ClassTypey + ClassTypep + ClassTypee + " "
      + ClassTypea + " " + ClassTypes + ClassTypee + ClassTypen
      + ClassTypet + ClassTypee + ClassTypen + ClassTypec
      + ClassTypee + " " + ClassTypet + ClassTypeh + ClassTypei
      + ClassTypes + " " + ClassTypew + ClassTypea + ClassTypey
      + "!");
    

    You're wrong.. You should use ClassTypeSpace, ClassTypeComma and ClassTypeExclamation :P

  • tork (unregistered)
    Comment held for moderation.
  • Cothe (unregistered)

    Таможенный импортер «ВЭД ЛАЙН» является внешнеэкономической компанией в сфере таможенных услуг и торговли с КНР, которая функционирует на рынке Владивостока. «ВЭД ЛАЙН» https://ved-line.ru предлагает своим контрагентам надежные услуги по мультимодальной перевозке грузов, таможенному оформлению также сертификации импортных товаров в таможенных органах. Декларанты компании «ВЭД ЛАЙН» предоставят консультационные услуги в сфере деятельности таможенного оформления, и в случае нужды представят интересы в пользу заказчика в суде.

  • Cothe (unregistered)
    Comment held for moderation.
  • Biff (unregistered)

    Корабли транспортируют товары в разные части страны и в другие территории земли. Недостаток стойких внешнеполитических ситуаций во многих странах возникает затруднением по дороге фрахта, однако выгодное бизнес-партнерство дружеской азиатской страны со странами таможенного союза ЕАЭС остается крепким. Имеется потенциал заказывать дешево крупноразмерный товар, получив опытную консультацию на каждом пути. Из всех видов наибольшую дедвейт носит только судно. Водный транспорт https://ved-line.ru играет наивысшую роль в внешнеэкономической торговле любой страны. Морские расстояния - это подарок природы, и, поэтому, для их поддержания не требуется никаких вложений. Это превосходство превращает морские перевозки грузов из КНР успешными для обеих сторон. Денежные траты не выше в сопоставлении с другими видами перевозок. На морских путях нет сложностей с транспортными пробками. Это дает шанс миновать задержек, когда осуществляется отправка морским судном из Китая.

Leave a comment on “ArticleTypeCodeSOD”

Log In or post as a guest

Replying to comment #:

« Return to Article