테스트를 하다보면 부득이 하게 음원데이터가 필요할 경우가 있다.
mp3 파일을 구하기란 쉽다. 약간 불법적인 방법(?)으로 P2P 사이트를 이용하면 수백메가에서 수기가를 채우기란 쉽다. 그러나, 음원정보 데이터를 구하기란 쉽지 않다.
우리나라에 등록된 음원은 과연 총 몇개일까?
일반적으로 원하는 내용은 다음과 같을 것이다.
앨범명
가수명
가요순위
제작자
발표년도
앨범수록곡
앨범수록곡 작사/작곡/편곡
...
이런 정보를 어디서 얻을수 있을까?
벅스뮤직/네이버뮤직/소리바다 ... 등등에서 얻을수 있을 것이다.
그래서, 얻었습니다.
각각의 사이트에서 가지고 있는 음원정보량이 틀리기 때문에 어느 정도 규햡해야 할거 같지만 일반적으로 [가요]로 분리되는 음원에 대해서 몇만곡정도 되는 것같습니다.
( 저작권 문제가 있을지 몰라서 아직 안올렸습니다. )
자동차 산업 소프트웨어 신뢰성 협회 ( 영국 그러나, 유럽표준? )
C는 애매모호한 것들이 많다. 문법부터 시작해서 표준도 다양하다.
Relational Database 에서의 1NF, 2NF, 3NF, BCNF, 4NF, 5NF 를 들어 보았습니까? 리얼월드를 데이터베이스로 만들기에는 많은 점들이 애매모호합니다. 이는 0과 1로 이루어진 머신에는 참으로 적용하기 어렵습니다.
그래서, Normalization 을 합니다. 정규화를 함으란 결국 제약조건과 룰을 적용합니다.
MISRA-C 도 같습니다. 더 포괄적인 DO-178B, IEC 61508, 도 마찬가지입니다.
MISRA-C/C++ 이 있고, MISRA-C 98/2004/2008 등이 있다. 년도가 높을수록 제약조건이 더 많아 진다.
그리고, 만약에 여러분이 MISRA-C 규약에 맞게 코딩했다고 해도 인증은 안됩니다. MISRA에서 인증받은 툴 또는 기관을 통해서 인증받아야 합니다. 물론 유료입니다. 가이드집도 유료입니다. 그러나, 비싸지는 않듯 싶습니다.
MISRA는 심지어 유명한 컴파일러에서 컴파일 불가능한 것도 가이드합니다. 유럽쪽에서는 어느 정도 인정받는 것같습니다. 그러나, MISRA-C를 지키면 C가 아닌 코드가 되어 버립니다. 참으로 아이러니합니다.
코딩 스타일 가이드와 코드 가이드 체크가 조금씩 부각되고 있는 것같습니다. 곧 테스팅에 일부가 되지 않을까요.
URL : http://www.misra.org.uk/
Development Guidelines for Vehicle Based Software
The MISRA Guidelines provide important advice to the automotive industry for the creation and application of safe, reliable software within vehicles.
The Guidelines are intended for use by all those involved in the creation, procurement and support of vehicle based software.
Users may be within vehicle design and manufacturing companies, component suppliers, development tool suppliers and diagnostic equipment suppliers.
Uses for the MISRA Guidelines include:
- guidance for creating contracts and specifications for software procurement
- an introduction to issues of automotive software reliability
- a basis for training requirements within the automotive industry
- guidance for company quality procedures
- guidance for management on resource requirements
- a basis for assessment
- a foundation for a standard.
WHY were they produced?
Special guidance for automotive software is needed because there are important differences between software and other forms of automotive engineering and components.
There are also differences between automotive software applications and applications in other industrial sectors.
WHAT is the scope?
The Guidelines provide a link between established automotive engineering disciplines and software engineering.
WHAT are the principles?
The Guidelines encapsulate many principles and concepts, such as:
- safety, like justice and democracy, must be seen to be present
- software robustness, reliability and safety, like quality, should be built in rather than added on
- the requirements for human safety and security of property can be in conflict. Safety must take precedence
- system design should consider both random and systematic faults
- it is necessary to demonstrate robustness, not rely on the absence of failures
- safety considerations should apply across the design, manufacture, operation, servicing and disposal of products.
The 80 pages of the MISRA Guidelines give over 450 recommendations, presented against the background of a software lifecycle.
Subjects covered include:
| Assessment Control systems design Controllability categories Diagnostics Distributed systems Documentation Education and experience Emerging technologies Fault management Floating point arithmetic Human factors |
Management responsibilities |
WHEN are they useful?
The MISRA Guidelines are forward-looking, providing guidance for the development of both systems in use today and the advanced features being planned for the next decade.
RegEx 는 막강합니다. 저도 즐겨 쓰고, 애용하고 있습니다. 그러나, 무분별한 사용은 코딩에 해롭습니다.
February 16, 2005
Regex use vs. Regex abuse
I'm a huge fan of regular expressions; they're the swiss army knife of web-era development tools. I'm always finding new places to use them in my code. Although other developers I work with may be uncomfortable with regular expressions at first, I eventually convert them to the regex religion sooner or later. If you're working with strings in any capacity at all-- and what developer isn't-- it's hard to deny the flexibility of regular expressions. Why use 6 lines of procedural If..Then blocks to process a string when you can do the same thing in a concise, 20 character regex pattern? And if you put that same pattern in a .config file, you can now change the behavior of your app without recompiling. It's less code doing more work.
I have, however, been accused of foisting an unintelligible syntax on unsuspecting developers. To the uninitiated, regular expressions can seem totally indecipherable-- like Q*Bert on crack:
And I can't blame them. Regular expressions are complicated. It's a balancing act. You could say that all regular expressions are WTFs, and I wouldn't necessarily disagree with you. Though you can do some incredibly complex things with regular expressions, usually you don't need to. It's typically much more prosaic:
validating a phone number
"^\(*\d{3}\)*( |-)*\d{3}( |-)*\d{4}$"
getting the trailing folder from a path
"[^\\]+\\*$"
extracting the userid from a domain\userid pair
"[^\\]+$"
These things are easier to implement and maintain with relatively straightforward regular expressions. All developers should learn to use basic regular expressions, because they'll produce better, more flexible, more maintainable code with them.
Used responsibly, regular expressions are a huge net positive. What seperates regex use from regex abuse? Take a gander at this 6.2kb monster for validating RFC822 email addresses:
(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t] )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?: \r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:( ?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\0 31]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\ ](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+ (?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?: (?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z |(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n) ?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\ r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n) ?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t] )*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])* )(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t] )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*) *:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+ |\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r \n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?: \r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t ]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031 ]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\]( ?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(? :(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(? :\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(? :(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)? [ \t]))*"(?:(?:\r\n)?[ \t])*)*:(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]| \\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<> @,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|" (?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t] )*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\ ".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(? :[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[ \]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000- \031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|( ?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,; :\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([ ^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\" .\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\ ]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\ [\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\ r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\] |\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \0 00-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\ .|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@, ;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(? :[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])* (?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\". \[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[ ^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\] ]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)(?:,\s*( ?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\ ".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:( ?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[ \["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t ])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t ])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(? :\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+| \Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?: [^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\ ]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n) ?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[" ()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n) ?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<> @,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@, ;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t] )*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\ ".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)? (?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\". \[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?: \r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[ "()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t]) *))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]) +|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\ .(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z |(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:( ?:\r\n)?[ \t])*))*)?;\s*)
The author comments that [this] somewhat pushes the limits of what it is sensible to do with regular expressions, to which I respond: somewhat? This is a 6,343 character pattern. How many more characters does it take to reach the limit of sensibility? It's abusive. I pity the poor developer who has to troubleshoot this behemoth.
Posted by Jeff Atwood
View blog reactions

Prev
